How to authenticate web service using JWT bearer token

Hello,

I have a JWT bearer token which returns me an authToken which expires every 12 hours. To create any new 3rd party API request using data actions, I need to send the token in the Authorization header. When I tried using both OAuth and Basic Auth it says the below error:

"message": "No authentication bearer token specified in authorization header."

In request template header, the web service is returning as below:

When trying the bearer token method in POSTMAN, it works fine and returns me result as shown below:

Is there a possibility to use the JWT bearer token in our data action? Thanks a lot for your response.

Regards,
Somik Mukherjee.

Hello,

Unfortunately, I doubt that the Web Services Data Action with Basic or OAuth credential types can work with JWT.
JWT support is only for a couple of providers, Adobe I/O, Google Cloud Platform Service Account, and Google GSuite Service Account. See this recent post on JWT auth for Web Data Actions.

As suggested in JWT auth for Web Data Actions and in Extracting data from a JWT posts, you can request a new feature and share your use case at https://genesyscloud.ideas.aha.io/ and allow others to vote it up.

Regards,

When you are creating an authToken are you able to use the exact same JWT bearer token every time, or does it have to change in some way every time? If it does not have to change at all you can probably use the Custom Auth type of data action, and create your own auth data action to get an updated authToken.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.