GET / sub-user/tokens

Base URL: https://backend.easify.app/api/v2


This endpoint is used to fetch the Easify API tokens of sub users from the main user

The main user can fetch the Easify API tokens of subusers using this API. If a specific email ID is provided, only that user's token will be returned. Otherwise, all subusers' tokens will be returned in a paginated format.

There is a rate limit of 60 requests per minute. If you exceed this limit, you will receive a 429 Too Many Requests status, along with a message indicating when you can try again.

Authentication

The Easify API token used for authentication is passed in the header as a Bearer token, which can be obtained from the easify app under Settings > API Settings.

Headers

Authorization string required Bearer << YOUR_EASIFY_API_TOKEN_HERE >>

Query Parameters

email string Specific Email id of subuser Optional
limit string Limit for pagination (Default 10) Optional
All parameters should be URL encoded to ensure they are correctly transmitted. Forexample, the + character must be encoded as %2B

Sample Params and Success Response:

Params:

{
  "email": "easify@app.com"
}

Success Response:

{
  "message": "Sub Users",
  "status": true,
  "data": [
    {
      "email": "easify@app.com",
      "name": "Sub User Easify",
      "easify_api_token": "1087|f906c6df-759e-42cd-8dc7-4980b308****"
    }
  ],
  "links": {
    "first": "https://backend.easify.app/api/v2/sub-user/tokens?page=1",
    "last": "https://backend.easify.app/api/v2/sub-user/tokens?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "links": [
      {
        "url": null,
        "label": "« Previous",
        "active": false
      },
      {
        "url": "https://backend.easify.app/api/v2/sub-user/tokens?page=1",
        "label": "1",
        "active": true
      },
      {
        "url": null,
        "label": "Next »",
        "active": false
      }
    ],
    "path": "https://backend.easify.app/api/v2/sub-user/tokens",
    "per_page": 10,
    "to": 1,
    "total": 1
  }
}

Api Response Status

Case Status Code Response
If the user does not provide a token in the header or provides an invalid token 401 { "status":false, "message":"Unauthenticated", "errors":[] }
If user not provided invalid email id 400 { "status": false, "message": "No sub users associated with this email address!", "errors": [] }
If there is no subusers for the mainuser 400 { "status": false, "message": "No sub users found!", "errors": [] }
When a subuser tries to access this API 400 { "status": false, "message": "Access denied: Subusers do not have the required permissions to perform this action. Please contact an administrator for assistance.", "errors": [] }
If the user exceeds the allowed rate limit for requests 429 { "status":false, "message":"Too many requests. Try again in 59 seconds", "errors":[] }
If the user's subscription has ended 402 { "status":false,"message":"You need to recharge your account to proceed","errors":[] }
If the user does not have an enterprise plan 403 { "status": false, "message": "Access denied. Your current plan does not allow access to this feature. Please upgrade to the Enterprise plan.", "errors": [] }

PHP-cURL

php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://backend.easify.app/api/v2/sub-user/tokens',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer 1955|43da5bb5-5c2b-4059-a4de-d44bf5*****'
  ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;

pixel for linkedin