Token request from my domain shouldn't give me 302 Skip to main content
https://support.okta.com/help/answers?id=9060z000000jjo3qac&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Raja BellamRaja Bellam 

Token request from my domain shouldn't give me 302

Hi,

I would like to make a token request from my domain with okta domain as it's orign and host header. Currently I am getting a 302, but I want a 200 reponse.

Regards
Valeriu HudeaValeriu Hudea (Okta, Inc.)
Hey Raja, 

The 302 is a success response depending on the call you are making : 
https://developer.okta.com/docs/api/resources/oidc?_ga=2.57442153.291323607.1526657848-1237359624.1526657345#response-example-success-3  

The endpoint for browser based OIDC flow you would have to go to the 
v1/authotize endpoint to validate request and return a token : 
https://developer.okta.com/docs/api/resources/oidc?_ga=2.57442153.291323607.1526657848-1237359624.1526657345#authorize
  
Her you would find some examples for requests : 
https://developer.okta.com/docs/api/resources/oidc?_ga=2.57442153.291323607.1526657848-1237359624.1526657345#request-examples 

You would need the authorization code in a token request , you need the clientID of the specific app the scope , redirect URI of the apps endpoint  and the state , the following article shows an example of the browser flow :
https://developer.okta.com/blog/2017/07/25/oidc-primer-part-2#authorization-code-flow 

Best Regards