Mar 21, 2023 01:43 PM
When I make an API call using a Personal Access Token I have set up, it returns Error 401 Authentication Required - but if I change out the PAT to use the API Key, it works just fine.
Am I not able to use PAT's whilst I have a API Key enabled?
Solved! Go to Solution.
Mar 21, 2023 02:53 PM
Yep - I have tried that way as well, still get the same error "Authentication Required"
Mar 21, 2023 02:57 PM
There are no dependencies between the existence of access tokens and a previous user API key.
I have plenty of legacy API operations that are currently authenticated using my API key whilst simultaneously having been writing new connections with scoped access tokens.
This is proven in the fact that I'm able to make successful requests to the Web API as I posted in my previous screenshots.
Mar 21, 2023 03:00 PM
I didn't think there would be any dependencies between the two but this error has me totally stumped as to why my tokens would not be working - but the API key continues to work without issue.
Mar 30, 2023 06:50 PM
I'm so silly... the reason my PAT's were not working is because I was only using the Token ID - not the whole Token itself.
I went through the process of creating a new Token and immediately noticed my foolish error.
Jan 23, 2024 12:24 PM - edited Jan 23, 2024 12:30 PM
What do you mean by this? "I was only using the Token ID - not the whole token itself" do you mean not having the "pat" at the start of the token, or do you mean you were using the nickname of the token instead of the long string of text?
Edit: Now I see what you mean by Token ID. In your list of personal access tokens there is a Token ID field which is basically the first 14 characters of your pat.