# API Token

{% hint style="info" %}
API Token, like access tokens, have a set of capabilities assigned to them. However, unlike access tokens wich provides more fine-grained access control and can have limited lifetime, API keys provides full access to all the account resources and are long-lived.
{% endhint %}

## Get your API Token

You can generate and manage your API keys in the [Dashboard](https://smsbeta.com/dashboard/) > [Account](https://smsbeta.com/dashboard/account) > [API Token](https://smsbeta.com/dashboard/account#Token) .

## Use curl get  Token

You can also use curl to request to get your token

## Log in using account and password

<mark style="color:green;">`POST`</mark> `https://api.smsbeta.com/login`

#### Request Body

| Name                                       | Type   | Description               |
| ------------------------------------------ | ------ | ------------------------- |
| mail<mark style="color:red;">\*</mark>     | string | Your account email        |
| password<mark style="color:red;">\*</mark> | string | md5 encrypt your password |

{% tabs %}
{% tab title="200 login successful" %}

```json
{
    "code": 200,
    "Msg": "success!",
    "data": 
        {
            "token": "aaabbbccc",
            "mail": "xxx@xxx.com"
        },
      

}
```

{% endtab %}

{% tab title="401 Permission denied" %}

{% endtab %}
{% endtabs %}

Take a look at how you might call this method using our official libraries, or via `curl`:

{% tabs %}
{% tab title="curl" %}

```
curl https://api.smsbeta.com/login  
  --header 'content-type: application/json' \
  --data '{"mail":xxx@xxx.com,"password":"aaabbbccc"}'

```

{% endtab %}
{% endtabs %}

**password  need  md5 encrypt**&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://smsbeta.gitbook.io/documentation/api-token.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
