Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The OAUTH Token is generated using CURL.

Code Block
titleCURL - Generate OAUTH Token

 

curl -

...

d "grant_type=password&client_id=<client_id>&client_secret=<client_secret>&username=<salesforce_user_name>&password=<salesforce_password><security_token>"

...

 -X POST https://login.salesforce.com/services/oauth2/token

...

NOTE: there is no space between <salesforce_password> and <security_token>

...

The following shows a sample response received from the SalesForce system:

Code Block
titleCURL - Generate OAUTH Token

...

 

{"access_token":"00D9E0000000ZGl!AQoAQATcoQIashdlkjhkerwjC87giIs5umhHmQA_xWbb4qqM2t1asdaSXrUs8J.WXmCRQr2K93FydCd4y4qdG7zOmGC0LgDxEDJEDpf4n7AiygkS","instance_url":"https://cs88.salesforce.com","id":"https://test.salesforce.com/id/00D9AAE000000AAAA0ZGlUAM/0059E000002GhnoQAC","token_type":"Bearer","issued_at":"1510758069682","signature":"WKXl67nbYAAg+CeqU+eekp4AFDsasdasdarabctz1xmBN7DD7kcw="}

 The portion in "access_token" is required for testing the APIs using CURL.