cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1255
Views
5
Helpful
6
Replies

Services API access is revoked

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

6 Replies 6

LanDownUnda
Spotlight
Spotlight

Hi Vinura,

 

Can you supply the following for me to take a look:

  1. the HTTP request your sending
  2. the HTTP response your receiving

Thanks!

*** Rate All Helpful Responses ***

Hi Vanura,
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

Hi,
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

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

issue1.pngissue2.png

Actually there should be another image which comes between above two, saying that access to the API has been revoked. (Similar in format to the first one). Sorry for the inconvenience that I could not add that one. My mistake!

Hi Vinura,
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