I keep getting a error when trying to test the API
I just signed up for Calendly and am testing it out. There seems to be an issue when I create the Personal Access Token and use it for the API connection. Here is what I am getting returned:
401 Unauthorized
{
"title": "Unauthenticated",
"message": "The access token is invalid"
}
I am trying to test it within the docs, and have also tried testing through Postman, etc. Everywhere is showing the same error.
For security, I replaced the personal access token. Thank you for your help in advanced.
Page 1 / 1
@Austin33624 can you please try with just your token without the word ‘Bearer’ on the Token parameter?
@Austin33624 We currently have two-factor authentication set up for Personal Access Tokens. May I confirm that you went through that process, in generating the token?
@Austin33624 We currently have two-factor authentication set up for Personal Access Tokens. May I confirm that you went through that process, in generating the token?
I did not could you link an article or instruction of how to do that? It just let me create a key, thank you.
Click “Create Token,” and you will see an “Enter code to verify” popup
Check your email for the code (may be in your Spam folder)
Enter the code in the popup (ie, #4 above)
Click “Copy Token” (you should save this somewhere secure because you can only copy the token once)
Use this as the Bearer token in your API call
I am curious to know how you were generating the token earlier.
I hope this helps!
Also, as @Niraj mentions above, please do try removing “Bearer” when you request the API via the docs.
Further, please be sure to request future dates at the endpoint you are calling.
I am experiencing the exact same issue. The API Key provided after pressing 'Regenerate Key” does not work—with or without the 'Bearer' prefix.
Please help.
I have the same issue. Do you have any workaround?
Problem: I am using OAuth flow for my app and at first I was getting the invalid token error.
Solution: I changed my app from “sandbox to production” and created a new token after that and add “Bearer prefix” which changed the error from Invalid token to Invalid Argument which was fixed by passing an object to the data instead of string. Make sure to use ngrok etc.