API keys provide programmatic access to Plotly Cloud without requiring an interactive browser login. Use them in CI/CD pipelines and automated scripts to publish and manage Dash apps.
API keys are available on Pro team plans and higher.
You can manage API keys in your team settings. To create a new key:
<img>
<img>
sk_ and is only shown once.<img>
Important: Store your API key securely. You won’t be able to view it again after closing the creation dialog.
Pass the key directly with the --api-key global option:
plotly --api-key "your_api_key_here" app publish --name my-app
Or set the PLOTLY_API_KEY environment variable so you don’t have to pass it on every command:
export PLOTLY_API_KEY="your_api_key_here"
plotly app publish --name my-app
Either approach skips interactive login and authenticates directly. This is the recommended approach for non-interactive environments like CI/CD.
Note: API keys only work with
appcommands. User commands likeuser teamsanduser whoamirequire personal authentication viaplotly user login.
API keys grant programmatic access to your Plotly Cloud apps. A leaked key allows anyone to publish code to your apps or modify their settings without your knowledge.
Keep the following in mind:
API keys are scoped to your team, but whether API keys can edit a given app is an app-level setting. This means that not all apps on your team are necessarily manageable by API keys, but every app that does have API key access enabled is editable by all of your team’s API keys.
To enable or disable API key access to an app:
Open the app’s Sharing settings in Plotly Cloud.
In API keys, choose a permission level:
- Can edit — API keys can publish updates and modify app settings.
- No access — API keys cannot access this app (default).
<img>
To revoke and delete an API key, go to your team settings and find the key in the API Keys tab. Select the … menu next to it and confirm in the dialog. The key is invalidated immediately. This action cannot be undone.
<img>
<img>