# 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;
