
ドユ.67787 (Customer) asked a question.
I am a super admin of a trial account. I have created a token and tried using it to make a call to the Okta API.
I have tried GET /api/v1/apps and also GET /api/v1/users/me. Both with the same result.
I have tried it through curl and also using Postman.
Here is the curl command, which I have used in Windows (personal information removed):
curl -i -X GET "https://{my subdomain}.okta.com/api/v1/apps" -H "Authorization: SSWS {my API token}"
This gives me the following error:
{"errorCode":"E0000011","errorSummary":"Invalid token provided","errorLink":"E0000011","errorId":"oaeF-EyC2LVRjya3F4Dyp3hHQ","errorCauses":[]}
What I have tried:
- Create a new token
- Make sure token is still active/valid
- Check the permissions of the token (token has the correct permissions to access /api/v1/apps*)
- Make sure that there are no typos in the subdomain or in the token
- Make sure that the subdomain in which the token was created is the same as the subdomain which I am trying to access
It should work, but it doesn't. So I am not sure, what is going wrong.
Since it is only a trial account, I am not able to create a ticket with the Okta support, which is why I am writing this post.
If anyone has an idea, what the cause might be, please let me know.
Any help is greatly appreciated.

Hello @ドユ.67787 (Customer) Thank you for posting on our Community page!
If everything you mentioned is correct then there shouldn't be any reason for the API call to fail.
The only think that comes to mind is that your Postman setting are using an old API token, which causes the API call to fail.
I would recommend to review you setting and make sure the current valid API token is being used and not an older one.
https://developer.okta.com/docs/reference/rest/
Thank you for reaching out to our Community and have a great day!
--
Help others in the community by liking or hitting Select as Best if this response helped you.
I will give it a try, but that would only explain, why it didn't work through Postman. It doesn't explain, why curl didn't.
Could it have something to do with the account being a trial account?
Hello @ドユ.67787 (Customer) Technically speaking that should not be the cause as you should be able to use API from Trial/Developer accounts.
There should not be such limitations to these type of Orgs.
Thank you for reaching out to our Community and have a great day!
--
Help others in the community by liking or hitting Select as Best if this response helped you.
I see. Then I really don't know why the curl API call doesn't work.
I get an error message, so it reaches the end point.
I have checked all the general tips and points regarding the "Invalid token provided" error, so none of those should be the cause either.
Would providing the subdomain help you in any way to find a possible cause for the error? Or does the error really just point to something being wrong with the created API token?
I am also getting an same error for the last couple of days. Recently, I have generated a new token and problem started from that time. Till last week, my API calls are working perfectly but in the last week, I had changed my token as it was expired. After generating a new token, I am getting the same error like mentioned above. Till now I have generated different tokens but the results are same. Could you please do the needful ?
I am having same problem in my TRIAL site. Started last week. Thought the API Key expired. Wasn't expired. I create a new one as well. Tried that, same problem. "Invalid token provided". Would like this to get fixed soon.