Request an access token

Prev Next
Post
/services/oauth2/token

Use this endpoint to obtain a Salesforce OAuth 2.0 token response that you will use to authenticate calls to Zilliant APIs.

Where to send the request
Send this POST request to the Salesforce login server for your org type:

What to do with the response
Salesforce returns a JSON token response. Base64-encode the entire response body (encode the full JSON payload, not only the access_token field). Then include the encoded value in the Authorization header for Zilliant API requests in this format: Authorization: OAuth <tokenResponseBase64>.

Environment-specific tokens
Generate and use a separate token response for each environment, for example, DEV and PROD. Do not reuse a token response across environments.

Rate limits and caching
Salesforce limits authentication calls to 3600 calls per hour per user. Cache the token response and reuse it until the token expires. When it expires, request a new token response, Base64-encode it, and update the Authorization header value.
Body parameters
object
grant_type
string Required

OAuth 2.0 grant type. Must be set to password.

Valid values[ "password" ]
username
string Required

Username of the user.

password
string (password) Required

Password of the user.

client_id
string Required

Consumer key of the Zilliant OAuth connected app. If Zilliant owns and administers the Salesforce org, contact your Zilliant representative for this value.

client_secret
string (password) Required

Consumer secret of the Zilliant OAuth connected app. If Zilliant owns and administers the Salesforce org, contact your Zilliant representative for this value.

Responses
200

Successful response retuturning an access token.

{
  "access_token": "",
  "instance_url": "",
  "id": "",
  "token_type": "Bearer",
  "issued_at": "
object
access_token
string

OAuth 2.0 access token.

instance_url
string (uri)

Base URL of your Salesforce instance.

id
string (uri)

Identity URL that includes the organization ID and user ID.

token_type
string

Type of token.

issued_at
string

Time at which the access token was issued.

signature
string

Signature that you can use to verify the access token.