Closed jotraverso closed 3 years ago
Thanks for the contribution! Unfortunately we can't verify the commit author(s): Jorge Ortega j***@r***.net. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, sign the Salesforce.com Contributor License Agreement and this Pull Request will be revalidated.
Hi @jotraverso !
Thanks for your pull request. I wonder if those calls correspond to already existing ones ?
Seb
Hi @scolladon,
It's a good point :)
Let me suggest to set up the _refreshToken environment var in the test script of the Web Server Flow 2
pm.environment.set("_accessToken", jsonData.access_token); pm.environment.set("_refreshToken", jsonData.refresh_token); pm.environment.set("_endpoint", jsonData.instance_url); pm.environment.set("_userId", id.pop()); pm.environment.set("_orgId", id.pop());
I cannot promise, but I'll try to submit a new pull request for this improvement, think you can close.
Jorge Ortega.
That's a very good idea @jotraverso !
I think it could also be done in the User Agent Flow right ?
duplicated by #32
Requests to get Refresh Token
Added requests to obtain Authorization Code previous to get Access and Refresh tokens following the instructions found here https://medium.com/@bpmmendis94/obtain-access-refresh-tokens-from-salesforce-rest-api-a324fe4ccd9b
OAuth 1 - Get Authorization Code. Requests a URL to log in at Salesforce to get an authorization code. The connected App Policies should be configured with Permitted Users = "All users may self-authorize" You may use https://oauth.pstmn.io/v1/callback or https://www.getpostman.com/oauth2/callback as redirect url
OAuth 2 - Post for Access and Refresh Token. Uses the authorization code to obtain an access token and a refresh token in the same call.