Obtaining an OAuth API Access Token

The Authorization resource provides OAuth 2.0 API access tokens. Other than with OAuth 1.0, OAuth 2.0 does not provide any inherent cryptographic protection of the token but relies on all the requests to be performed via a SSL secured connection. Therefore, all API calls must always be made only using the HTTPS protocol!!

Client  Credential Flow

POST /oauth2/token/

This flow does not deal with an end-user but in this case the application itself is assumed to be the resource owner. The application requests the authorization server for an access token in exchange for client_id and client_secret. The client_id and client_secret are provided when creating an application.

Body Parameters:
Request Parameters:

Example

curl -X POST -d 'scope=mediahub,autograph&grant_type=client_credential&client_id=c53067b79169464aa3139c78&client_secret=ZqdEFsMX8OWz8yZAAHoy4zM1k0peftMpaPE5pyWo1XgDXGIGoJRtHJJJxwP8crq3' "https://api.xvid.com/v1/oauth2/token/?human=true&expires_in=7200"
{
  "access_token": "5JffwBZ_PDAg6qioaTZqHYsLqEVL2ygyKrgoAH3TRLjNxN0mEecDRodAUtjV00ti",
  "expires_in": "7200"
}

Watch out! The client_secret may contain characters that must be URL-encoded. So don't forget to URL-encode the value of your client_secret parameter!