v1

latestOpenAPI 3.1.02026-08-04164270844.7 KB
Authentication

Create an access token for plugin (backend)

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/plugin/oauth2/backend-token

Request body

client_idstring required

The client ID associated to the plugin for this environment.

client_secretstring required

The client secret associated to the plugin for this environment.

company_idstring ObjectId required

The unique ID of the company.

plugin_idstring ObjectId required

The unique ID of the plugin.

Example request

{
  "client_id": "00918d22e6cd4dd0bf751241853ec641",
  "client_secret": "de831d67bd4245bc950867ca49b5ebc2",
  "company_id": "507f1f77bcf86cd799439011",
  "plugin_id": "507f1f77bcf86cd799439011"
}

Response

Returns an access token that must be used in all your calls to public API endpoints. This access token can only be used inside a plugin.

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"
}