CLI Error: 401

Linode Staff

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

Linode Staff

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.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct