Skip to Main Content

Cloud Platform

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

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

Prashant SinhaJul 14 2022

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.
image.pngimage.png
Thanks in advance
Prashant

Comments
Post Details
Added on Jul 14 2022
1 comment
499 views