How to pass access token url in authentication flow oauth2 with curl ? #80908
Replies: 3 comments
-
curl -X GET "AUTH_URL?client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&response_type=code&scope=SCOPE" |
Beta Was this translation helpful? Give feedback.
-
To pass an access token in an OAuth2 authentication flow with curl, you'll generally follow these steps:
Step 1: Get the Access Token This should return a JSON response with the access token: Step 2: Use the Access Token in Requests Replace "YOUR_ACCESS_TOKEN" with the actual token from the response in Step 1. |
Beta Was this translation helpful? Give feedback.
-
Same question |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
Hi,
i follow the authentication flow with oauth2.0.
As in postman i can enter the
AUTH URL to start the process with a webpage and then authenticate on this external webpage with username and password.
I set the ACCESS TOKEN URL to my url which gets the code of the first step and receive a token.
Now i want to repeat this flow with curl, not in postman.
a) start AUTH URL to the external webpage and generate the code.
Which parameters must be set to handle later ACCESS TOKEN URL ?
b) This first section generates the code which i need for step c)
c) step b) must now use my ACCESS TOKEN URL and send the parameter code to receive then an new BEARER ACCESS TOKEN.
I have seen the console log, but i have never found my individual ACCESS TOKEN URL in this process, but with postman it works. I can get a BEARER TOKEN.
Beta Was this translation helpful? Give feedback.
All reactions