You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a POST request using any REST client (e.g. POSTMAN) with the following specifications:
POST https://login.salesforce.com/services/oauth2/tokenContent-Type: application/x-www-form-urlencoded"grant_type" : "authorization_code",
"client_secret" : "YOUR CONSUMER SECRET",
"client_id" : "YOUR CONSUMER KEY",
"redirect_uri" : "YOUR CALLBACK URL",
"code" : "THE CODE YOU RECEIVED FROM THE LAST STEP"
e.g. code aPrxshT49BthlzJeik7p6fUxxxxxxxxxxxxxxxdzhQQBhDbTb13LFeDkSYNT1AEHetgjQEMBsQ==
Execute and you will receive the token in the following format:
{
"access_token": "YOUR ACCESS TOKEN",
"refresh_token": "REFRESH TOKEN",
"signature": "xxxxxxxx=",
"scope": "visualforce refresh_token wave_api custom_permissions openid chatter_api api id eclair_api full",
"id_token": "A REALLY LONG ID TOKEN",
"instance_url": "https://YOUR-ORG.salesforce.com",
"id": "https://login.salesforce.com/id/xxxxxx/yyyyyy",
"token_type": "Bearer",
"issued_at": "1523268989479"
}
Test the access token by calling any API endpoint with the Authorization Bearer YOUR ACCESS TOKEN header.
POST https://YOUR-ORG.salesforce.com/services/data/v42.0/sobjects/contactAuthorization: Bearer xxxxxxxxxx