Guide for Using SMS Ekame API
This API allows users to:
- Create orders to get phone numbers for SMS services.
- Check the status of created orders.
- Retrieve a list of supported countries.
- Retrieve a list of available services.
- Manage their unique API token for secure access.
1. Getting Your API Token
Get Token2. Creating an Order
Use this endpoint to create a new order for a phone number.
API Details:
- Endpoint: /wp-json/smsekame/v1/create-order
- Method: GET
- Required Parameters:
- api_token– Your unique API token.
- service– The service you want the number for (e.g.,- telegram,- whatsapp).
- country– The country code for the number (e.g.,- 0for Russia,- 1for Ukraine).
Example Request:
curl -X GET "https://ekame.net/wp-json/smsekame/v1/create-order?api_token=your_api_token&service=telegram&country=0"Example Response:
{
  "status": "success",
  "order_id": "123456",
  "number": "79998887766",
  "price": 0.08
}Errors:
- Insufficient Funds:
  {
    "code": "insufficient_funds",
    "message": "Not enough funds to complete the order",
    "data": {
      "status": 403
    }
  }- Invalid Token:
  {
    "code": "unauthorized",
    "message": "Invalid token",
    "data": {
      "status": 401
    }
  }3. Checking Order Status
You can check the status of an existing order using this endpoint.
API Details:
- Endpoint: /wp-json/smsekame/v1/order-status
- Method: GET
- Required Parameters:
- api_token– Your unique API token.
- id– The ID of the order you want to check.
Example Request:
curl -X GET "https://ekame.net/wp-json/smsekame/v1/order-status?api_token=your_api_token&id=123456"Example Response:
{
  "status": "success",
  "data": "STATUS_OK:247359"
}4. Retrieving a List of Supported Countries
This endpoint retrieves a list of countries where services are available.
API Details:
- Endpoint: /wp-json/smsekame/v1/get-countries
- Method: GET
Example Request:
curl -X GET "https://ekame.net/wp-json/smsekame/v1/get-countries"Example Response:
{
  "status": "success",
  "countries": [
    { "id": 0, "name": "Russia" },
    { "id": 1, "name": "Ukraine" },
    { "id": 2, "name": "Kazakhstan" }
  ]
}5. Retrieving a List of Available Services
This endpoint retrieves a list of SMS services you can use.
API Details:
- Endpoint: /wp-json/smsekame/v1/get-services
- Method: GET
Example Request:
curl -X GET "https://ekame.net/wp-json/smsekame/v1/get-services"Example Response:
{
  "status": "success",
  "services": {
    "telegram": "Telegram",
    "whatsapp": "WhatsApp",
    "viber": "Viber"
  }
}6. Notes and Recommendations
- Keep your API token secure: Do not share your token with anyone.
- Use HTTPS: Always ensure you are accessing the API via HTTPS for security.
- Error handling: Make sure to check the statusandcodein the API responses to handle errors appropriately.
- Balance management: Ensure your account has sufficient funds before attempting to create orders.
If you have any questions or need help, contact support or refer to this guide for further clarification.
