on 2023 Nov 22 9:50 AM
I am trying to make an API call with the token generated with the link: https://b3cxxxxxxxx.authentication.us10.hana.ondemand.com/oauth/token?grant_type=client_credentials and my ClientID and ClientSecret as per my Document Information Extraction Secret Key generated on BTP.
The token that I obtained was checked by me on the subject of the audience. And the data in the payload of the token was correct and corresponded to my service key json data.
However, when I try the token in https://aiservices-dox.cfapps.us10.hana.ondemand.com/document-information-extraction/v1/, I get the 401 Error Audience validation failed. I tried refreshing the token, refreshing the browser, deleting cookies, and NOTHING WORKED. One day, the token was accepted and the API call was successful; the next day, the new token failed completely randomly and without regard for any rationale. Please advise on how to resolve the bug. Thanks!
P.S Every time I insert my token with Bearer before it. The Audience Failed error is appearing and disappearing regardless. Yesterday I had 40 attemptions to execute an API and it didnt worked. On the 41st attemption it worked. Today I have the problem again with a newly generated token. Apparently, there is a bug. Please advise on how to fix it. Thanks!
Request clarification before answering.
Hi Daria,
please make sure to write the string "Bearer " in front of the access token when you authorize yourself as described here in step 1.3:
Bearer <access_token>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
57 | |
10 | |
9 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.