<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00008tZrM5CAKOkta Classic EngineAPI Access ManagementAnswered2025-09-13T09:01:51.000Z2023-03-07T05:28:17.000Z2023-03-09T21:16:50.000Z

ylnh1 (ylnh1) asked a question.

Problem of experimenting the Token Exchange Flow

I was experimenting the Token Exchange Flow (https://developer.okta.com/docs/guides/set-up-token-exchange/-/main/) . I have enabled this feature:  OAuth 2.0 On-Behalf-Of Token Exchange feature

 

However, I was not able to go through the steps listed by this document

 

Issue *1 "Authorization Code with PKCE request": This document says sent /v1/authorize request via POST, I never get it work using curl or post man. After searching around, I think this document is missing a step on login. Even I add login step, and I got the sessionToken, still I cannot get this step work in either Post request as documented, or change to GET request as many browser based application does.

Because of this issue, I leverage a simple sample App (GitHub - okta/samples-js-react: React Auth SDK sample) to get the Subject Access Token. This App can let me get what we need in step: Authorization Code with PKCE request and Exchange code for tokens request

 

So, when I try the step: Token exchange request from service app to API, I got the error :

{"error":"access_denied","error_description":"Policy evaluation failed for this request, please check the policy configurations."}

 

The System Log says:

Image is not available

 

 

 

 


This question is closed.
Loading
Problem of experimenting the Token Exchange Flow