Unable to create Access token grant type in wso2 API manager store to test API

拟墨画扇 提交于 2019-12-08 05:02:49

问题


I am following this link

Read this paragraph "The API is now available in the API Store and ...."

Am working on window in this paragraph they are saying create Access token "curl" command. But i am unable to do that.

Also am creating access token after subscribe API In "MY Subscription" tab there are two option to create Access token "Production" and "Sandbox" but by using that token API calling giving error.

" 900910 The access token does not allow you to access the requested resource Access failure for API: /accessPolicy/v1.0.0, version: v1.0.0 with key: e2dc44322fe78bb7bdb6d83519ff863e "


回答1:


900910 is a custom error code [1] and according to that you are trying to access a resource with an invalid access token. Basic idea is that, your access token do not have the correct scope which is requested for the resource access. When you are generating the access token, please provide the relevant scope.

[1] - https://docs.wso2.com/display/AM1100/Error+Handling




回答2:


The error means the token you generated does not have the related scope. This could happen because either the user you try to generate this token does not have relevant roles to generate this token with this scope or your token request does not have the scope parameter defined correctly.

When you do a request to the token endpoint, the response payload contains the scope (if no scope or scope is not valid for this user, it returns scope as 'default'). So you could check whether the requested token has the correct scope.

Finally, I think the curl is not working on windows the same way as it works in linux (something to do with single and double quotes ). So either you will have to change the curl command or use a rest client (such as POSTMAN)



来源:https://stackoverflow.com/questions/54351535/unable-to-create-access-token-grant-type-in-wso2-api-manager-store-to-test-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!