# Authentication

To use the Message Status API, authenticate with:

- **API KEY** by entering the credentials provided by the Namirial support.


Ensure you include the following headers in your request:

`X-Api-Key: YOUR_API_KEY` (replace YOUR_API_KEY with your actual API key)

Example:


```bash
curl -X GET https://sms-apistatus.test.namirialtsp.com/api/messagestatus/YOUR_MESSAGE_ID \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY"
```

## Troubleshooting Authentication Issues

Common authentication errors and solutions:

| HTTP Status | Error code | Error | Solution |
|  --- | --- | --- | --- |
| `401` | 2 | `Empty or missing api-key` | Verify that the `X-Api-Key` header is present and contains a valid API key for the target environment |
| `403` | 3 | `Invalid path` | The requested path does not exist. Verify the endpoint URL |


**401 — Unauthorized**


```json
{
  "error": {
    "code": 2,
    "message": "Empty or missing api-key"
  }
}
```

**403 — Invalid path**


```json
{
  "error": {
    "code": 3,
    "message": "Invalid path"
  }
}
```

For the full list of the environments, see [API References](/products/sms/enterprise-documentation/developer-documentation/apistatus-references).

## How to get API Credentials

Submit a request through the Namirial support portal.