Forum Stats

  • 3,852,354 Users
  • 2,264,094 Discussions
  • 7,905,044 Comments

Discussions

Using Bearer Token to use as authorization instead of Basic Auth to call Get Worker REST API

Prashant Sinha
Prashant Sinha Member Posts: 1 Red Ribbon

Hello,

I've been trying to use bearer token to perform a GET call using REST API (hcmRestApi/resources/11.13.18.05/workers). I've have roles assigned as basic Auth works like a charm (unless bearer token authorization needs other privileges).

I've created a certification and uploaded in API Authentication under Security Console (see 1st screenshot).

This is my JWT & I'm generating encoded signature from https://jwt.io/

{

 "alg": "RS256",

 "typ": "JWT",

 "x5t": "base64 encoded value"

}


{

 "iss": "www.mycompany.com",

 "prn": "myusername",

 "iat": 1657787417,

 "exp": 1670869236

}


I'm sure I'm missing something here as everytime I'm trying Postman is throwing 401 unauthorized error.

Any help towards its resolution will be helpful.


Thanks in advance

Prashant

Answers