Skip to main content
Solved

API request works for basic auth but not for Oauth 2.0


Mark Leunissen
Captain
Forum|alt.badge.img+4

Hi,

 

I am running into a weird issue with an API request. Firstly, I’ve made a client application on my test environment (which is hosted on Azure). Sending both post and get requests work perfectly with the client credentials.

After testing on the test environment, I moved on to testing on the acc environment. I have created the client application in the same way as on the test environment. However, the acc environment is hosted on premise. 

When trying the same api request for the acc environment, I get the following error:

Specifically: Bearer error="invalid_token", error_description="The issuer 'https://p2p-acc.tkb.nl/indicium' is invalid". I am trying to figure out how to fix this error, however there is a third party the is in charge of the on premise environment which also cant seem to figure out how this error is solved. 

Has anyone else ran into this issue? And how did you solve this error?

The request does work for a basic auth request, even with the exact same rights as the client application has.

Kind regards,

Mark

Best answer by Dani

Hey ​@Mark Leunissen ,

Could you please check if the appsettings " BearerTokenAuthority ” has been setup correctly?

For more information please check our documentation about OAuth bearer token (nr. 8)
https://docs.thinkwisesoftware.com/docs/iam/client_apps_certificates#oauth-bearer-token-example

 

Hope it helps.

Kind regards, 

Dani

View original
Did this topic help you find an answer to your question?

2 replies

Dani
Moderator
Forum|alt.badge.img+2
  • Moderator
  • 11 replies
  • Answer
  • June 12, 2025

Hey ​@Mark Leunissen ,

Could you please check if the appsettings " BearerTokenAuthority ” has been setup correctly?

For more information please check our documentation about OAuth bearer token (nr. 8)
https://docs.thinkwisesoftware.com/docs/iam/client_apps_certificates#oauth-bearer-token-example

 

Hope it helps.

Kind regards, 

Dani


Mark Leunissen
Captain
Forum|alt.badge.img+4

Hi ​@Dani 

 

The " BearerTokenAuthority ” was indeed not set up correctly. Works like a charm now!

Thanks.

 

Kind regards,

Mark 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings