I was trying to follow the apigee tutorial to learn oauth:
I was not to get any token from the example oauth proxy by running the following command from curl:
curl -k -X -V POST -H "Content-Type: application/x-www-form-urlencoded" https://helenhuang-eval-test.apigee.net/oauth/client_credential/accesstoken?grant_type=client_creden... -d client_id=gjlG3Jw7OP1raJ4PH6OGp2rBjpztcfWA -d client_secret=ukHEWRgJAAswMNm9 --proxy http://proxy-of-my-org.com:18717
The out put I got was:
<HTML><HEAD> <TITLE>Access Denied</TITLE> </HEAD> <BODY> <FONT face="Helvetica"> <big><strong></strong></big><BR> </FONT> <blockquote> <TABLE border=0 cellPadding=1 width="80%"> <TR><TD> <FONT face="Helvetica"> <big>Access Denied (content_filter_denied)</big> <BR> <BR> </FONT> </TD></TR> <TR><TD> <FONT face="Helvetica"> Your request was denied because of its content categorization: "none" </FONT> </TD></TR> <TR><TD> <FONT face="Helvetica"> </FONT> </TD></TR> <TR><TD> <FONT face="Helvetica" SIZE=2> <BR> For assistance, contact your network support team. </FONT> </TD></TR> </TABLE> </blockquote> </FONT> </BODY></HTML> client_id=gjlG3Jw7OP1raJ4PH6OGp2rBjpztcfWA&client_secret=ukHEWRgJAAswMNm9
Can you please take a look and let me know what might be wrong?
The CURL command supplied in the question is bad. If you are new to CURL, try using postman instead.
Here's the CURL that will give you the token. I just called it and received the response below.
REQUEST
curl --request POST --url 'https://helenhuang-eval-test.apigee.net/oauth/client_credential/accesstoken?grant_type=client_credentials' --header 'Content-Type: application/x-www-form-urlencoded' --header 'Postman-Token: 34f63085-3thd-375f-deh8-72fA2e15f8b4' --header 'cache-control: no-cache' --data 'client_id=gjlG3Jw7OP1raJ4PH6OGp2rBjpztcfWA&client_secret=ukHEWRgJAAswMNm9'
RESPONSE:
{ "refresh_token_expires_in": "0", "api_product_list": "[helloworld_oauth2-Product]", "api_product_list_json": [ "helloworld_oauth2-Product" ], "organization_name": "helenhuang-eval", "developer.email": "nigel@example.com", "token_type": "BearerToken", "issued_at": "1550919786955", "client_id": "gjlG3Jw7OP1raJ4PH6OGp2rBjpztcfWA", "access_token": "BJwZqKr8GKcukrVlDzyJTk9NTJiK", "application_name": "377f4704-b4e5-46c9-8236-5681d7687b8f", "scope": "", "expires_in": "3599", "refresh_count": "0", "status": "approved" }
If this post answers your question, please click accept so it will show as answered.
Thanks Robot, I have used Postman and it works.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |