1. Home
  2. Docs
  3. Method Calls
  4. Authentication

Authentication

To authenticate an application you must provide a username, password, and license key to an the authentication endpoint, and on successful authentication it will return a JSON web token that is checked on each request. The authentification endpoints are here for development and production environments.

Development:

https://development.sorce.io/wp-json/jwt-auth/v1/token

Production:

https://content.sorce.io/wp-json/jwt-auth/v1/token

Method:

The authentification request should be a POST request, with the following body parameters:

username : username is the name of the global application.

password : password of the global application

license : license key of the user. For a table of testing license keys, see here:

Content Headers

The following headers are expected and supported. Use of other headers have not been tested.

Connection: Keep-Alive
Content-Type: multipart/form-data;

Example Call

https://content.sorce.io/wp-json/jwt-auth/v1/token

Example Response

{
  "success": true,
  "statusCode": 200,
  "code": "jwt_auth_valid_credential",
  "message": "Credential is valid",
  "data": {
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvY29udGVudC5zb3JjZS5pbyIsImlhdCI6MTYzODYyMzMxMiwibmJmIjoxNjM4NjIzMzEyLCJleHAiOjE2Mzg2MjM5MTIsImRhdGEiOnsidXNlciI6eyJpZCI6MzAsImRldmljZSI6IiIsInBhc3MiOiJjNzkyNTlmZmNhOTRjYTE3MjA2NTA5MmE2NDVjZDRjMiJ9fX0.5jivXO-E2_sQP7XENxKTiAioHlOtEBHcK8nRwd31pGM",
    "id": 30,
    "email": "teamlead@sorce.io",
    "nicename": "sorce_team_lead",
    "firstName": "Eric",
    "lastName": "Team Lead",
    "displayName": "Eric Team Lead",
    "company_name": "SORCE",
    "team_name": "Engineering"
  }
}

Articles

Was this article helpful to you? Yes No

How can we help?

Leave a Reply

Your email address will not be published. Required fields are marked *