"user does not have access to this operation" when following example from documentation


As in the title; I have created a master (for all scopes) access token for testing purposes, and following the example from here, I used the following command, where the access token is exported just fine:

export TAILSCALE_ACCESS_TOKEN="$(pass show keys/oauth/tailscale/sylvorg.github/master || :)" && curl -H "Authorization: Bearer $TAILSCALE_ACCESS_TOKEN" "https://api.tailscale.com/api/v2/tailnet/-/devices"

Echoing $TAILSCALE_ACCESS_TOKEN simply gives me tskey-client-...-..., which seems alright, so I don’t quite know what’s going on.

Any help would be greatly appreciated!

I am also attempting to do the same thing and am running into the same issue. Did you ever get this figured out?

1 Like

As it turns out, I was misunderstanding the use of the OAuth token; what I really needed to do was use it to generate a temporary API key, which lasts an hour. :sweat_smile: The key is what you actually use!