I have a few namespaces which host Functions based in different regions. I’d like to use doctl to switch between the different Function namespaces for easy deployment, however I’m running into an issue when I attempt to use doctl serverless connect
. When running this command I receive a prompt to select the namespace I would like to connect to. After making my selection I receive the following message:
Error: GET https://api.digitalocean.com/v2/functions/namespaces/{namespace-id}: 403 You are not authorized to perform this operation
I’ve done the following troubleshooting:
doctl auth list
to ensure that I was using the correct auth contextdoctl serverless connect
again. In all situations I ensured the token had full function
scopeSo far I’ve only been able to successfully use this command when using an API token that has the full access scope. What are the granular scopes I can enable so I can use doctl serverless connect
without requiring an API token that has full access enabled?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Heya, @eldemetriou
The
doctl serverless connect
command requires the token to have full access to Functions. I believe currently, DigitalOcean’s granular API token scopes don’t provide a separate “read” or “limited” scope for Functions. This means that to perform operations likeserverless connect
, the token needs at least the Function scope.If granular scopes for Functions do not work for this specific command:
doctl serverless connect
.Steps:
This will allow you to switch between contexts for operations requiring broader permissions:
Hope that this helps!