Skip to content

Verify Token API ​

This API is to Verify if the token used is valid or not

Parameters for Verify Token API ​

Headers Parameters ​

ParametersDescription
AuthorizationPlease add provided Bearer token - linked to your Cellcast account. Check here

Code Samples ​

Get https://api.cellcast.com/api/v1/user/token/verify

bash
curl --location 'https://api.cellcast.com/api/v1/user/token/verify' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{API_KEY}}'
js
const axios = require("axios");

const verifyToken = async () => {
  try {
    const response = await axios.get("https://api.cellcast.com/api/v1/user/token/verify", {
      headers: {
        Accept: "application/json",
        Authorization: "Bearer {{API_KEY}}",
      },
    });
    console.log(response.data);
  } catch (error) {
    console.error(error.response.data);
  }
};

Replace API_KEY with the actual API KEY that you own

Responses ​

200 OK

json
{
  "app_type": "web",
  "app_version": "1.0",
  "maintainence": 0,
  "new_version": 0,
  "force_update": 0,
  "invalid_token": 0,
  "refresh_token": "",
  "show_message": 0,
  "is_enc": false,
  "status": true,
  "message": "Token verified successfully!",
  "message_type": "toast",
  "data": {
    "token": "API_KEY"
  },
  "error": {}
}

401 Unauthorized

json
{
  "code": 401,
  "message": "Token expired",
  "stack": "APIError: Token expired ...."
}