v1

latestOpenAPI 3.1.02026-08-04164270844.7 KB
Authentication

Create an access token

Creates an OAuth access token using the client_id and client_secret credentials. Once generated, the token authorizes access to the 360Learning API v2 resources for 1 hour. It must be included in the Authorization header of each request as Bearer.

post/api/v2/oauth2/token

Request body

grant_type'client_credentials' required

The method to request the OAuth access token. The only supported grant type is client_credentials.

client_idstring required

The client ID generated in the API v2 admin panel of your platform.

client_secretstring required

The client secret associated with your client ID.

user_idstring ObjectId

The unique ID of a user. This ID is mandatory for user authorized endpoints.

company_idstring ObjectId

The unique ID of a company. This ID is mandatory for service authorized endpoints.

Example request

{
  "client_id": "00918d22e6cd4dd0bf751241853ec641",
  "client_secret": "de831d67bd4245bc950867ca49b5ebc2",
  "user_id": "624c5526204fc7207e603123"
}

Response

Returns an access token that must be used in all your calls to public API endpoints.

token_type'Bearer' required

The type of the access token.

access_tokenstring required

The access token that authorizes access to API resources. Include the access token in the Authorization header of every request as Bearer.

expires_innumber required

The lifetime of the access token in seconds.

Example response

{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJBaU1qdVNjLW9pelVYWHBZVnZWbDZrSklsb2FNWDNWYzZSdWp4QnlPX05FIn0"
}