12-14-2020 07:34 AM
I am trying to use the /import-inventory and /import-inventory-status API and am getting 403 forbidden. I can access the other csapi modules with no problems. I'm using the same authentication credentials for both, in the same call to the script. I confirmed that csapi_collections is enabled for the user.
I saw a note about the API being broken for new users; is there any chance that it's also broken for existing users in any way?
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): apx.cisco.com
send: b'GET /cs/api/v1/collections/import-inventory-status?inventoryName=Testing&customerId=REDACTED HTTP/1.1\r\nHost: apx.cisco.com\r\nUser-Agent: python-requests/0.0.0\r\nAccept-Encoding: gzip, deflate\r\naccept: application/json\r\nConnection: keep-alive\r\nauthorization: bearer REDACTED\r\n\r\n'
reply: 'HTTP/1.1 403 Forbidden\r\n'
12-15-2020 06:39 AM
Hi Josh, Did you register for csapi-collections recently?
Regards
Suchita
12-15-2020 06:44 AM
No. I saw the notice about problems with new accounts but this has been registered for some time.
12-18-2020 06:56 AM
Can you provide any further assistance?
12-22-2020 05:20 AM
Still no response. Should I just check back in two weeks?
12-22-2020 06:53 AM
@josh1 Can you give it a try and redo the registration for csapi-collection API and share the results with us?
12-22-2020 08:14 AM
It's working. Script had been changed to use a Cisco test secret while working on previous issues, but that did not have access to the collections API. Switched it back to the other secret and it's working correctly.
12-22-2020 08:16 AM
Glad to know it is working. Thanks for the update.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide