function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jason AdamsJason Adams 

Is it possible to GET the OAuth token?

Greetings!

My apologies of this is against OAuth protocol (and let me know if it is), but I'm new ot OAuth.

Is it possible to simply do an HTTP GET for the token, rather than having to specify a redirect uri? It would just simplify the process if it were possible to retrieve the token and keep moving along, rather than que the process and wait for the callback.

Thanks!
Best Answer chosen by Jason Adams
AshlekhAshlekh
Hi,

If you are using aouth 2.0 then you have to use redirect of page to drive with which you want to integrate. When you redirect the user to drive then user enter his credentials to authorize your app to access the data behalf on his. When user allow your app then user will redirect to your call back URL with CODE after getting the code you don't need redirect any user to any where use the CODE to convert it access token by HTTP request.


IF it helps you than please mark it as a solution and ENJOY APEX

All Answers

AshlekhAshlekh
Hi,

If you are using aouth 2.0 then you have to use redirect of page to drive with which you want to integrate. When you redirect the user to drive then user enter his credentials to authorize your app to access the data behalf on his. When user allow your app then user will redirect to your call back URL with CODE after getting the code you don't need redirect any user to any where use the CODE to convert it access token by HTTP request.


IF it helps you than please mark it as a solution and ENJOY APEX
This was selected as the best answer
Jason AdamsJason Adams
That makes sense. I wondered if it was part of the OAuth standard to have a redirect.