For test purposes, I'm trying to use some customer's REST API on Salesforce. I don't have any API-consuming code yet (I'm just using CURL, OAuthDebugger, et similia).
I've tried the following this guide, but I'm stuck. This is what I've done:
Phase One: Getting the Authorization Code
- I've created a New Connected App with my user's mail
- I've set
https://oauthdebugger.com/debug
as callback URI
Question n.1: is there another way to get the redirected response?
I've compiled OAuthDebugger as follows:
- Authorize URI:
https://test.salesforce.com/services/oauth2/authorize
- Redirect URI:
https://oauthdebugger.com/debug
- Cliend ID: my Consumer Key
- Scope:
api
- Response type:
code
- Response mode:
form_post
- Authorize URI:
I've clicked Send Request, then logged in into Salesforce, and finally authorized the App
I've been redirected to
https://oauthdebugger.com/debug
where I successfully got the Authorization Code.
Question n.2: After some time, the Authorization Code expired, but further calls to the same API returned the same (invalid) code again. How can I set/remove its expiration time, and how can I renew it to obtain a new one?
Phase Two: Getting the Token
- At this point, I need to call the Token URL (
https://test.salesforce.com/services/oauth2/token
) passing the Authorization Code and the Consumer Secret, to get a Token to use for the subsequent REST API calls. I can't use OAuthDebugger to perform this call, because of the Consumer Secret, so I'm resorting to CURL. I'm not able to get the returning token, by the way.
Question n.3: which callback URL should I use here?
Thanks in advance.