An access token is used to authorize API. For each API call, an access token should be added to the HTTP header of the request like this:
authorization: access_token 1234567890abcdef
API key and secret can be generated for each ArcSite company. Go to Settings - Integrations - Apps to get them. The API Key and Secret will be automatically generated when the connection to Salesforce or I360 is successful. You can find them in the App Card of Salesforce or I360.
IMPORTANT NOTE: Customers should store the key and secret safely.
Steps to get access token:
All API calls will return JSON with both a code
and a data
property. Exceptions to this will be specified in the documentation.
You should always attempt to JSON decode the response, then use the code
property to determine if the API call succeeded. code
for a successful API call would always be 0.
{
"code": 0,
"data": {...}
}
The data
property of errors will include a message
and a code
to help you determine what went wrong. Non-zero error codes should never change so you can rely on them to make programming flow choices if necessary.