Dev DOC WhatsApp - SMSMobileAPI
SMSmobileAPI Developer Documentation This documentation is specific to sending a WhatsApp message only. It is also possible to send a WhatsApp message and an SMS simultaneously.

SMSmobileAPI では、あらゆるアーキテクチャやプラットフォームと API を可能な限り互換性のあるものにするよう努めています。
REST、SOAP、cURL、または Python、JavaScript、PHP などのさまざまなプログラミング言語を使用している場合でも、当社の API はプロジェクトにシームレスに統合できるように設計されています。

また、eコマース ソリューションやソフトウェア用のすぐに使用できるプラグインもご用意しています。 クリックしてご覧ください.

ご質問、ご提案、またはサポートが必要な場合は、当社のチームがお手伝いいたします。
お気軽にお問い合わせください api@smsmobileapi.com

API レスト
cURL
JavaScript JavaScript
Python パイソン
Node.js Node.js
Ruby ルビー
WSDL

Send WhatsApp API

The SMSMobile API supports two authentication methods: using a simple API Key or the OAuth2 protocol with a client ID and client secret.

1. API Key Authentication for Send SMS

This method requires an API Key that can be included as a parameter in either a GET or POST request. It is a straightforward way to authenticate your API requests.

https://api.smsmobileapi.com/sendsms?apikey=YOUR_API_KEY&waonly=yes&recipients=PHONE_NUMBER&message=MESSAGE_TO_SEND

パラメータ:

- apikey: Your unique API key.
- recipients: The recipient's phone number (The number must be available on WhatsApp).
- message: The message to send (Multiple lines possible).
- waonly: must have the value yes -> Required to specify that only one WhatsApp message should be sent

Example:

GET https://api.smsmobileapi.com/sendsms?apikey=YOUR_API_KEYY&waonly=yes&recipients=+1234567890&message=Hello%20World

2. OAuth2 Authentication for Send SMS

OAuth2 provides a more secure and scalable authentication method.
You will need to use a client ID and client secret to obtain an access token, which should then be included in your API requests using the Authorization header.

The client_id and client_secret are available in your dashboard, accessible after installing the app and creating an account on your mobile device.
Download the mobile app now または access your dashboard.

Obtaining an Access Token

To get an access token, send a POST request to the token endpoint with your client ID and client secret.

curl -X POST https://api.smsmobileapi.com/oauth2/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=1ab0ex4b4c1ef2c800690d" \
-d "client_secret=3ed108a93d0414074b94364290b6a7348475e93a0567005"

Using the Access Token:

Once you have the access token, include it in the Authorization header of your API requests:

curl -X POST https://api.smsmobileapi.com/sendsms?waonly=yes \
-H "Authorization: Bearer abc123xyz456" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "recipients=+1234567890" \
-d "message=Hello"

Which Method Should You Use?

- Use API Key Authentication for quick and straightforward integrations.

- Use OAuth2 Authentication for enhanced security and scalability in your integrations.

For more details, please refer to the full documentation.

モバイルを接続する
jaJapanese