Retrieve token

This method allows you to retrieve a specific token.

GET

/token

Query Parameters

id
required
The account ID you wish to create a token for

Examples


GET /token/15 HTTP/1.1
Host: api.smsfactor.com
Authorization: Bearer your.token
Accept: application/json
      
    

Result Format


{
  "status": 1,
  "message": "OK",
  "token": {
        "name": "Best token ever",
        "api_token_id": 15,
        "created_at": "2024-11-21 09:32:03",
        "expired_at": "2024-11-21 10:32:03",
        "ttl": 3600,
        "is_active": "1",
        "allowed_ips": [
            "127.0.0.1"
        ]
    }
}
          
        

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>1</status>
  <message>OK</message>
  <token>
    <name>Best token ever</name>
    <api_token_id>Best token ever</api_token_id>
    <created_at>2024-11-21 09:32:03</created_at>
    <expired_at>2024-11-21 10:32:03</expired_at>
    <ttl>3600</ttl>
    <is_active>1</is_active>
    <allowed_ips>127.0.0.1</allowed_ips>
  </token>
</response>