Get Token for Authorization Code

Hi

I am try to call this api https://api.mypurecloud.jp/api/v2/conversations/calls from postman, when i using Client Credential postman can get the token, but appear an error

{

"message": "This request requires a user context. Client credentials cannot be used for requests to this resource.",

"code": "not.a.user",

"status": 400,

"contextId": "47ca00a4-8604-4da5-b573-9f835ee8661f",

"details": [],

"errors": []

}

But when I change the get token to Authorization Code always failed to get token,
when i am using postman in my local laptop what is the value for Authorized redirect URIs (one per line) in the OAuth type Code Authorization,

Please advise

Husein

Please verify your configuration in Postman, you have configured something incorrectly. There's a similar thread here: Can't get passed API security - #2 by tim.smith

Hi Tim

Thank you for the update, i have try like link you share its working for this Api => https://api.mypurecloud.jp/api/v2/users , but still failed for this API POST => https://api.mypurecloud.jp/api/v2/conversations/calls, the error appear still same , Is it I cannot use Client Credentials for this API => https://api.mypurecloud.jp/api/v2/conversations/calls

{

"message": "This request requires a user context. Client credentials cannot be used for requests to this resource.",

"code": "not.a.user",

"status": 400,

"contextId": "37dc3127-55ab-40f4-8ccc-7d9bd4fad0cd",

"details": [],

"errors": []

}

That's correct. The error is accurate that you must use user-based authorization to use that endpoint. I was referring to your configuration of Postman for using an auth code grant. Something about your configuration in Postman isn't set up correctly to use the auth code grant. It does work when configured correctly.

Hi Tim

Which OAuth Grant Types I must use for this API https://api.mypurecloud.jp/api/v2/conversations/calls,

Is it using Code Authorization ? If Yes what value must put in Authorized redirect URIs (one per line) for access API from Postman , Please advise

Literally any of the supported grants except client credentials.

the same value you use when configuring postman

Just try use postman from browser, but still failed to get the , could please advise

Below the image from the configuration postman

OAuth Genesys

Auth url is wrong. Please refer to the documentation for correct values: https://developer.genesys.cloud/platform/api/postman#enable-authorization

Hi Tim

Its working now, thank you so much for the detail guidance

1 Like

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