Exchange an authorization code or refresh token
Accepts JSON, form-urlencoded, or multipart form data. Confidential clients may send client_id and client_secret with HTTP Basic auth; body credentials are also accepted. The special connection_key branch exchanges a Salesforce connection refresh token for a salesforce:runtime access token.
Permission
Credentials are optional here.
HTTP Basic, using your client ID and secret.
Request body
Sent as application/json or application/x-www-form-urlencoded or multipart/form-data.
grant_typestringOne of
authorization_code, refresh_token. codestringcode_verifierstringredirect_uristring (uri)client_idstringclient_secretstring (password)scopestringrefresh_tokenstring (password)connection_keystringResponses
200Access token issued.
access_tokenstringrequiredexpires_inintegerrequiredrefresh_tokenstringscopestringrequiredtoken_typestringrequiredAlways
Bearer. 400Invalid OAuth request, grant, code, redirect URI, or grant type.
errorstringrequirederror_descriptionstring401Invalid OAuth client credentials or access token.
errorstringrequirederror_descriptionstring500OAuth server error.
errorstringrequirederror_descriptionstring