Token

\Modules\Api\User\Token

Methods

verify

<?php public static function \Modules\Api\User\Token::verify($token = null)

Description
Verify that the validity of the user token.

Parameters

  • token
    The user's authentication token

Return
array : user's informations or error message

{
  "id": 1,
  "first_name": "my firstname",
  "last_name": "my lastname",
  "username": "username",
  "picture": null,
  "company": "Apps Panel",
  "phone": "0600000000",
  "last_updated_at": null,
  "status": 1,
  "bo_access": 1,
  "api_access": 1,
  "created_at": "2018-05-22 11:02:39"
}

// or an error object like : 

{
  "error": {
    "message": "invalid_token",
    "key": "invalid_token",
    "code": 1
  }
}