List Users API {{url}}/api/v1/users?limit=25 Skip to main content
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Daniel WardDaniel Ward 

List Users API {{url}}/api/v1/users?limit=25

I am testing list users. It works fine in Postman and I can see the results. I try the exact same curl from PHP and I get thrown are error message which is ErrorCode":"E0000011","errorSummary":"Invalid token provided", I am using the same apikey in both and I am not sure why it would throw an error. I have clear trusted the domain using CORS etc.
Marc JohnstonMarc Johnston (Okta, Inc.)
Hi Daniel,

From the ErrorCode E0000011there was an Invalid token provided 401. The error codes are listed in this URL below:

Here is a curl I have run from the command line recently to return users. You will also need to replace the subdomain to match your Okta org and update the xxxxxtokenxxxxxxxx with your token

curl -v -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: SSWS xxxxxtokenxxxxxxxx" ''