SMSPortal

GRATUITO
Por SMSPortal | Atualizado 2 months ago | SMS
Popularidade

5.1 / 10

Latência

362ms

Nível de serviço

100%

Health Check

N/A

Voltar para todos os tutoriais (2)

Best Practices

Request Structure

All requests to the API consist of the following:

  • Endpoint: The URL that indicates the resource being accessed.
  • Version: The version of the resource being accessed, defaulting to the latest version if not specified.
  • Parameters: Any required/optional parameters for the resource.
  • Body: Any JSON body that is required by the resource (POST only).
  • Authorisation Parameters: In every request made to the REST API (except when generating a token) you will be required to pass your token.

Base URL

The base URL for the API is https://rest.smsportal.com and supports HTTPS. To access a specific version of the API, simply postfix the URL with the version of the API, as in the case of https://rest.smsportal.com/v1.
The base URL will always be set to use the latest version of the API.

API Credential Security

When using API credentials, always make sure that you keep them secure. Exposing your credentials publicly can result in your account being compromised.
Do not embed API credentials directly in code:
Always be sure not to embed your API credentials within your code. This could result in them accidently being made public and can compromise the security of your account.

Parameter Formatting

  • Date and Time: All date and time parameters are treated as UTC time and should be in the ISO 8601 format. See ISO 8601 for more information.
  • URL Encoding: Parameters must be URL encoded. For ease of reading, however, URL parameters have been left unencoded for the purposes of this document.
  • Number Format: When sending SMSes internationally the REST API requires phone numbers in E.164 format.

Token Generation

Tokens should only be regenerated just before the maximum validity period of 24 hours is about to be reached. Regenerating a new token any sooner is unnecessary and creates additional overhead on the system.

For more details see our documentation on Best Practices.