For businesses that use SMS messaging services, managing gateway rates and URL shorteners is essential for cost-efficiency and ease of access. WaSMS SMS API provides endpoints to retrieve current gateway rates and available shorteners. Here’s a guide on how to implement these endpoints in your WHMCS knowledge base.
1. Retrieving Gateway Rates
To retrieve gateway rates, use the following endpoint:
- Endpoint:
GET https://sys.wasms.net/api/get/rates
- Required Permission:
get_rates
Parameters:
secret
: Your API secret, which you can get from (Tools -> API Keys) in your account.
Sample Request (PHP):
Success Response: The response includes details about gateways and partner devices with their respective rates and supported currencies.
2. Retrieving Available Shorteners
The SMS API also provides access to a list of URL shorteners that can be used within SMS messages.
- Endpoint:
GET https://sys.wasms.net/api/get/shorteners
- Required Permission:
get_shorteners
Parameters:
secret
: Your API secret.
Sample Request (PHP):
Success Response: The response lists available shorteners that can be used within the WaSMS platform.
Error Responses
Both endpoints return standardized error responses:
By integrating these API calls, WHMCS users can easily keep track of SMS gateway rates and manage URL shorteners for streamlined and cost-effective messaging.