
User16774946990625697824 (Customer) asked a question.
I used `curl` to call oauth2 get token api, but it failed in my staging environment(from a vpc in alicloud), return `{"errorCode":"E0000006","errorSummary":"You do not have permission to perform the requested action","errorLink":"E0000006","errorId":"oaeKRcvRCvvSkWKgA7XJVyh1A","errorCauses":[]}`.
But it succeeded when I used the same payload from my macbook pro and another vpc in alicloud.
Please help to see what happened.

Hi @User16774946990625697824 (Customer) , Thank you for reaching out to the Okta Community!
Your issue sounds similar to this:
https://support.okta.com/help/s/question/0D50Z00008G7Uv8SAF/failed-to-fetch-the-user-details-from-okta-apiexception-you-do-not-have-permission-to-perform-the-requested-action?language=en_US
If things work in one environment and not the other, it typically means that there's a misconfiguration.
I would double-check any API tokens that you might be using and not only if they are valid, but if they have the proper Admin level.
If my answer helped, remember to mark it as best to increase its visibility for other members of the Okta Community who might have the same questions as you.
Hope my answer helps!
--------------------------------
Community members help others by clicking Like or Select as Best on responses. Try it today.