cancel
Showing results for 
Search instead for 
Did you mean: 

Audience Validation Failed Persists Document Information Extraction

daria_loziienko
Discoverer
0 Kudos

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!

Accepted Solutions (0)

Answers (1)

Answers (1)

korbinianhutter
Explorer
0 Kudos

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>

daria_loziienko
Discoverer
0 Kudos

I always do. Thank you for the recommendation tho. The problem still persists and the error is acting quite chaotically: appearing and disappearing. Now it is persisting and I am looking for the way to remove the bug completely.