Let the platform do the work

/oauth2/token POST


Retrieves the token portion of the OAuth 2.0 specification.

Request Arguments

Name Type Description Required
grant_type String Type of request. Available grant types are "password" and "refresh_token". True
client_id String Used to identify the client. A client_id of "sugar" will automatically create an OAuth Key in the system that is used for "password" authentication. A client_id of "support_portal" will create an OAuth Key that will allow for portal authentication. Additional client_id's can be created by the administrator in Admin > OAuth Keys to allow for additional grant types. If the client secret is populated, it will be validated against the client id. True
client_secret; String The clients secret key. True
username String The username of the user authenticating to the system. True
password String The plaintext password the user authenticating to the system. True
platform String The platform type. Available types are "base", "mobile", and "portal". True

Request for Password Grant Types


Request for Refresh Token Grant Types


Response Arguments

Name Type Description
access_token String The access token needed to authenticate for other methods.
expires_in Integer The length of time until access_token expires in seconds.
token_type String The token type. Currently only "bearer" is supported.
null|   The Oauth scope. Normally returned as null.
refresh_token String The token needed to extend the access_token expiration timeout.
refresh_expires_in Integer The length of time until refresh_token expires in seconds.
download_token String The token used to download images and files.



Change Log

Version Change
v10 Added /oauth2/token POST endpoint.