## Access Token

### Obtain a New Token

**cURL**

```
curl --request POST \
  --url https://openapi.octoparse.com/token \
  --header 'Content-Type: application/json' \
  --data '
{
  "username": "<string>",
  "password": "<string>",
  "grant_type": "password"
}
'  
```

**Response**  
200

```
{
  "data": {
    "access_token": "<string>",
    "expires_in": 123,
    "token_type": "<string>",
    "refresh_token": "<string>"
  },
  "requestId": "<string>"
}
```

### Body

**application/json**

| Parameter   | Type   | Required | Description                            |
|-------------|--------|----------|----------------------------------------|
| username    | string | Yes      | Account email address or username       |
| password    | string | Yes      | Account password                        |
| grant_type  | string | Yes      | Must be `password`, Example: `"password"` |

### Response

**200 - application/json**  
Token obtained successfully

| Parameter  | Type  | Description   |
|------------|-------|----------------|
| data       | object| Show child attributes |
| requestId  | string|                  |
