Services API access is revoked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2020 01:46 AM
Hi all,
I am currently trying to retrieve information from Cisco CCW-R's REST API as described on devnet, using the APIs on the developer portal. I keep getting responses that my application's access to the API has been revoked. Is there a special procedure to have the privileges to access CCW-R or any other solution to get the API working?
Thank you
- Labels:
-
Support APIs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 03:21 AM
Hi Vinura,
Can you supply the following for me to take a look:
- the HTTP request your sending
- the HTTP response your receiving
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 04:07 AM
How do I know you are a CISCO employee?
The script uses a config file which calls the Automated Software Distribution API multiple times. First thing it does is get the Access / EULA / Software Suggestion Tokens.
Which of the requests do you want to see?
* Token Access
* Metatdata
* Download the URL's for the file.
* The URLS that downloads the file.
Regards,
Simon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 05:21 AM
Thanks for the reply.
I currently work in a firm which is a Cisco partner and has full access to CCW-R platform.
The current problem I face is that I get a 403 response for a valid token I use. (As an example for a GET request I send to the API). I think it's due to the reason that my application which I registered at the developer portal is continuously getting revoked from the access to the APIs that I intend to use. (eg:- csapi-customer). I want to know is there any solution to that? Or should I wait until I get the access to the APIs (as per the messages I receive it is said that I will receive permission once the API owners grant me permission)
Thank you,
Vinura
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 05:08 AM
Hi,
Thanks for the reply.
For the instance I am sending a GET request ( https://apx.cisco.com/cs/api/v1/inventory/hardware) with a token obtained from cloudsso.cisco.com/as/token.oauth2 ... URL, I am receiving a 403 (forbidden) error. I think the problem is here, where I get messages as below whenever I try to re-register or register a new API.
Is this normal that should I wait? or is there any other solution?
Thanks,
Vinura
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 05:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2020 07:03 AM
I'm not the chap to ask really. You would have to make sure the contracts are in place for the devices you are using. In bash:-
TOKURL="https://cloudsso.cisco.com/as/token.oauth2"
( curl -s -k -H "Content-Type: application/x-www-form-urlencoded" -X POST -d "client_id=${ASDCID}" -d "client_secret=${ASDCSC}" -d "grant_type=client_credentials" ${TOKURL} ) 2>&1 > $TOKENFN
The last of the 4 variables ${TOKENFN} is the File Name which will contain the response from CISCO.
TOKEN=`cat $TOKENFN | awk -F\" '{print $4}'` # Extract the Actual Token.
Variables:- ${ASDCID} & {ASDCSC} Are copied from the API Registraton.
Look for 'access_token' in the response. NOTE the Token will last only 60 minutes, so if like my then script takes hours you need to refresh it.
Sorry I can't help you more.
Regards,
Simon