# Error Codes Reference

SMS Gateway returns specific error codes to help identify and resolve issues with message delivery. This reference provides detailed information about each error code and recommended solutions.

## Error Code Summary

| Error Code | Error Type | Description |
|  --- | --- | --- |
| 8 | Wrong destination number | The destination number is invalid or cannot receive SMS |
| 56 | Invalid number format | The destination number format is malformed |
| 59 | Invalid reference service | The provided reference service is not recognized |
| 60 | Anti-flooding block | Message blocked by anti-flooding protection |
| 61 | Watchlist block | Message blocked by watchlist rules |
| 63 | Authentication error | Missing or invalid credentials |
| 64 | Provider unavailable | SMS provider is temporarily unavailable |
| 66 | Invalid message text | Message text is empty or exceeds the maximum length (1600 characters) |
| 74 | URL not allowed | Message containing URL is denied |
| 76 | Account not found | The specified account does not exist |


## Error Code 8: Wrong Destination Number

#### Description

The destination number is invalid or cannot receive SMS messages. This error occurs when the number exists but cannot accept SMS delivery. It indicates a permanent failure. Retrying will produce the same error.

#### REST Error Response


```json
{
  "code": 8,
  "message": "Wrong number",
  "details" : null
}
```

#### Common Causes

- Number is not active or has been disconnected
- Number belongs to a landline that cannot receive SMS
- Number is in a country or network that blocks SMS
- Number has opted out of receiving SMS messages


#### Solutions

1. Verify the destination number is correct and active
2. Confirm the number belongs to a mobile device


## Error Code 56: Invalid Number Format

#### Description

The destination number format is malformed or does not conform to international numbering standards.

#### REST Error Response


```json
{
  "code": 56,
  "message": "Invalid number",
  "details" : null
}
```

#### Common Causes

- Missing country code prefix
- Extra characters (spaces, dashes, parentheses)
- Incorrect number of digits
- Invalid country code
- Double plus signs or other formatting errors


#### Solutions

1. Use international format with country code: +[country code][number]
2. Remove all spaces, dashes, and special characters
3. Verify the country code is correct
4. Ensure the number has the correct length for the destination country


## Error Code 59: Invalid Reference Service

#### Description

The provided reference service value is not recognized by SMS Gateway. Reference services must be from the predefined list of allowed values.

### REST Error Response


```json
{
  "code": 59,
  "message": "Invalid reference service",
  "details" : null
}
```

#### Common Causes

- Using a custom service name not in the allowed list
- Typo in the service name
- Case sensitivity mismatch


#### Solutions

1. Check the [Reference Attribute Documentation](/products/sms/enterprise-documentation/developer-documentation/integration-guide/attribute-reference) for allowed service values
2. Verify the service name spelling and case
3. Omit the reference parameter if not needed
4. Contact support to register a new service name if required


## Error Code 60: Anti-Flooding Block

#### Description

The message was blocked by the anti-flooding protection system. This system enforces a rate limit per destination phone number: if too many messages are sent to the same number within a short time window, subsequent messages are blocked. This is a permanent failure for that specific send attempt — the message will not be delivered.

For details on how the anti-flooding system works, see [Anti-flooding](/products/sms/enterprise-documentation/products-and-modules/sms-gateway/smsgw-anti-flooding).

#### Solutions

Reduce the frequency of messages sent to the same destination number. Wait before retrying.

## Error Code 61: Watchlist Block

#### Description

The message was blocked because the destination number, LRA, or country combination exists in the watchlist. Watchlist entries are used to block specific patterns or destinations.

### REST Error Response


```json
{
  "code": 61,
  "message": "Watchlist error",
  "details" : null
}
```

### Common Causes

- Destination number is on the account watchlist
- Number has been flagged for abuse or fraud
- Country or prefix is blocked for your account


### Solutions

1. The destination number is blocked by watchlist rules. It is not possible to send SMS to this number. If you believe this is an error, contact Namirial support.


## Error Code 63: Authentication Error

#### Description

The request is missing authentication credentials or the provided credentials are invalid.

#### REST Error Response


```json
{
  "code": 63,
  "message": "Missing basic authentication header",
  "details": null
}
```

#### Solutions

1. Include the `Authorization: Basic base64(username:password)` header in every request.
2. Verify that username and password are correct and the account is active.
3. See [Authentication](/products/sms/enterprise-documentation/developer-documentation/authentication) for setup instructions.


## Error Code 64: Provider Unavailable

#### Description

The SMS provider for the destination country is temporarily unavailable. This is typically a transient error that resolves automatically. The SMS Gateway implements automatic retry logic, and this issue occurs only if all the providers are not available.

### REST Error Response


```json
{
  "code": 64,
  "message": "Provider unavailable",
  "details" : null
}
```

### Common Causes

- Temporary provider outage or maintenance
- Network connectivity issues
- Provider service degradation


### Solutions

1. Implement retry logic
2. Check Namirial status page for known issues
3. Contact support if the issue persists


## Error Code 66: Invalid message text

#### Description

The message text is empty, missing, or exceeds the maximum length of 1600 characters. This is a permanent failure — the message will not be sent.

#### REST Error Response


```json
{
  "code": 66,
  "message": "Empty or missing message text",
  "details": null
}
```


```json
{
  "code": 66,
  "message": "Message text exceeds maximum length of 1600 characters",
  "details": null
}
```

#### Solutions

1. Ensure the `text` field is present and not empty in the request body.
2. Ensure the message text does not exceed 1600 characters.


## Error Code 74: URL Not Allowed

#### Description

The message contains a URL and the account is not enabled to send this type of content. This is a permanent failure — retrying will produce the same error.

#### Solutions

1. Contact support to configure the account to send URLs


## Error Code 76: Account Not Found

#### Description

The `account` field in the request specifies a username that does not exist. This error applies only to the [Send SMS (Admin)](/products/sms/enterprise-documentation/developer-documentation/api-references/admin-send) endpoint. This is a permanent failure — verify the account username before retrying.

#### REST Error Response


```json
{
  "code": 76,
  "message": "Account nonexistent_account does not exist",
  "details": null
}
```

#### Solutions

1. Verify the `account` field contains a valid username.
2. Omit the `account` field to send using your own account.


## FAQ

### What should I do if I receive an error I don't recognize?

Contact Namirial support with the complete error response, including error code, message, and request details. Include the message ID if available.