To test any REST services you provide via Apex, an OAUTH token will be required. This makes debugging simpler and faster.
See https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_username_password_oauth_flow.htm for a reference.
The following information is needed from the Connected App Configuration:
The OAUTH Token is generated using CURL.
|
NOTE: there is no space between <salesforce_password> and <security_token>
For the endpoints, use the following for the live system:
https://login.salesforce.com/services/oauth2/token
And the following for the test / sandbox system:
https://test.salesforce.com/services/oauth2/token
The following shows a sample response received from the SalesForce system:
|
The portion in "access_token" is required for testing the APIs using CURL.