CLI Error: 401
When trying to use the Linode CLI I'm asked for my Personal Access Token, I provide it but receive the following error:
Could not contact https://api.linode.com/v4/profile - Error: 401
That token didn't work: Invalid OAuth Token
How can I fix this?
1 Reply
We usually see this when customers are using tokens that were generated through the (now deprecated) Classic Manager, for Cloud Manager features. The Classic manager, along with it's API, is not compatible with the new Cloud Manager/CLI/APIv4. If you did use the Classic Manager to generate your token, you'll need to generate a new one using the Cloud Manager here. Then, configure linode-cli with the new token.
If you generated the token from the new Cloud Manager, it's possible that the token expired, or that the token has inaccurate permissions. In this case you would follow the same steps in generating a new token, with read/write permissions enabled for each service on your account, then configure Linode CLI with the new token.