Tokens abrufen

Mit dieser Methode können Sie Ihre Token abrufen.

GET

/token

Beispiele


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

Ergebnisformat


{
  "status": 1,
  "message": "OK",
  "tokens": [
      {
            "name": "Best token ever",
            "api_token_id": 15,
            "created_at": "2024-06-15 05:41:32",
            "expired_at": "2024-06-15 06:41:32",
            "ttl": 3600,
            "is_active": "1",
            "allowed_ips": [
                "127.0.0.1"
            ]
      },
      {
            "name": "Security much wow",
            "api_token_id": 17,
            "created_at": "2024-06-15 05:41:32",
            "expired_at": null,
            "ttl": null,
            "is_active": "1",
            "allowed_ips": null
      }
  ]
}
          
        

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>1</status>
  <message>OK</message>
  <tokens>
    <name>Best token ever</name>
    <api_token_id>Best token ever</api_token_id>
    <created_at>2024-06-15 05:41:32</created_at>
    <expired_at>2024-06-15 06:41:32</expired_at>
    <ttl>3600</ttl>
    <is_active>1</is_active>
    <allowed_ips>127.0.0.1</allowed_ips>
  </tokens>
  <tokens>
    <name>Security much wow</name>
    <api_token_id>Best token ever</api_token_id>
    <created_at>2024-06-15 05:41:32</created_at>
    <expired_at>null</expired_at>
    <ttl>null</ttl>
    <is_active>1</is_active>
    <allowed_ips>null</allowed_ips>
  </tokens>
</response>