Not Able to generate OAuth 2.0 Access Token in APIGee -
i new apigee. in project using oauth 2.0 authentication.but not able generate access token. have created required policies, still getting same error time.
this command using generate access token.
i using postman generate access token.
https://<myorgname>test.apigee.net/<myproxyname>/client_credential/accesstoken?grant_type=client_credentials&client_id=<myclient_id>&client_secret=<myclient_secret>’
i have tried curl
https://<myorgname>test.apigee.net/<myproxyname>/client_credential/accesstoken?grant_type=client_credentials -x post -d 'client_id=<myclient_id>&client_secret=<myclient_secret>’
both of them give same error
{ "fault": { "faultstring": "classification failed host orgname-test.apigee.net", "detail": { "code": "classification_failed" } } }
please help. in advance.
"classification failed" means url not resolving endpoint. there can several reasons this:
- you sending in wrong url. url need send in hostname + basepath + pathsuffix. when create proxy in apigee, default basepath /v1/proxyname. make sure /v1 isn't missing. can use trace see hostname + basepath supposed be.
- you calling https, proxy isn't set it. make sure secure virtual host referenced in proxyendpoint.
- your http verb may incorrect. need use post oauth token. make sure verb matches implementation. if don't provide verb using curl, defaults get.
- probably not cause of error, oauth parameters sent in via x-www-form-urlencoded payload, not via command line. also, client id , secret passed in via basic auth. apigee expects these locations default. see oauth 2.0 spec , apigee's docs details.
Comments
Post a Comment