SMS API

-- HTTP SMS API --

Authentification Niveau 1

 

 
   

Authentification Niveau 2

SMS campaign

  • POST
  • LISTE DES PARAMETRES
  • TABLE DES EREURS
Exemple
curl -X POST \https://ivoiresms.ci/pages/api/smsfree.php \
-H "curlopt_ssl_verifypeer: false " \
-d "{
  "token": "A générer dans votre compte SMS"
  "login": "FACULTATIF",
  "mdp": "FACULTATIF",
  "texte1": "text message1",
  "mobile1": "225xxxxxxxxxx;225yyyyyyyyyy",
  "texte2": "FACULTATIF",
  "mobile2": "FACULTATIF",
  "texte3": "FACULTATIF",
  "mobile3": "FACULTATIF",
  "schedule": "2022-09-19-20-10",
  "unicode": 1,
  "sender": "FACULTATIF",
  "tout": 0
  }"
 
Example 1
 
token : aabbcc
 
curl -X POST "https://ivoiresms.ci/pages/api/smsfree.php" -d "token=aabbcc&texte1=Hello innov&mobile1=2250141883544&sender=IVOIRESMS" -H "curlopt_ssl_verifypeer:false"
 
Example 2
 
token : aabbcc
schedule ::: 2024/01/06 11:05 AM
 
curl -X POST "https://ivoiresms.ci/pages/api/smsfree.php" -d "token=aabbcc&texte1=Hello innov&mobile1=2250141883544&sender=IVOIRESMS&schedule=2024-01-06-11-05" -H "curlopt_ssl_verifypeer:false"

PARAMETER VALUE
MANDATORY
DEFAULT VALUE
REQUEST

PARAMETER:

token

VALUE:

Set TOKEN into  your SMS account or please contact the service provider

MANDATORY:

yes

DEFAULT VALUE:

-
login Set login API into  your SMS account or please contact the service provider
false
-
mdp Set Password API into  your SMS account or please contact the service provider
false
-
token Set token to secure SMS sending (NB : there is an another token system activated by default)
false
 
texte1 Text of SMS message ( max. 160 characters AND max.160 characters for unicode ), (a-z or A-Z authorized) and some special characters
yes
-
mobile1 Recipient number separated by ; (semicolon)
yes
 
texte2 Text of SMS message ( max. 160 characters AND max.160 characters for unicode ), (a-z or A-Z authorized) and some special characters
false
-
mobile2 Recipient number separated by ; (semicolon)
false
-
texte3 Text of SMS message ( max. 160 characters AND max.160 characters for unicode ), (a-z or A-Z authorized) and some special characters
false
-
mobile3 Recipient number separated by ; (semicolon)
false
-
sender Other Sender value (SMS accounts on ivoiresms.ci are created with a default sender value)
false
-
schedule Schedule the sending  (format : yyyy-mm-dd-hh-ii) e.g : 2021-05-01-08-10.
Example : 2021/05/01 08H10 mn
false
-
check_mobile_ci 0: No Action
1: Check the validity of a phone number of Ivory Coast (Côte d'Ivoire).
false
1
unicode 0: Special characters are not accepted
1: Special characters are accepted
false
1
bulk_sms 0: bulk sms is disabled
1: bulk sms is activated
false
1
tout 0: Recipient numbers come from a thirdparty application other than ivoiresms.ci
1: Recipient numbers come from ivoiresms.ci
false
0
RESPONSE
STATUTS
id id of sms campaign
yes
-
smsCount Total text messages sent
yes
balanceSMSbefore Total sms remaining before sending the campaign
yes
-
createdAt Date of sending of the sms campaign
yes
-
sender sender of sms campaign
yes
-
text Text messages of sms campaign
yes
-
bulk_sms Bulk sms is activated or no
yes
1
recipients Recipient numbers
yes
[ ]
failed numbers of recipients whose sending was a failure
yes
[ ]
Type Description Http Status Code
unauthorized Unauthorized Access 400
unauthorized Unauthorized Access or use GET/POST Method 401
invalid_sender Invalid sender. Please, you must register this sender into your dashboard account or contact your provider
501
invalid_phone_number Invalid number or incorrect parameter 502
invalid_message Message must not exceed 160 characters 503
invalid_message Message must not exceed 160 characters 504
invalid_scheduled_date Invalid scheduled date or incorrect format or time exceeded 505
empty_message Empty message or incorrect parameter 506
no_recipients No recipients or incorrect parameter 507
bulk_sms_disabled Bulk SMS is disabled 508
low_credit Insufficient funds 509
delivrance_issue Delivrance Issue. Please check or contact your provider 510
invalid_date_after Invalid date_after or incorrect format or time exceeded 511
invalid_date_before Invalid date_before or incorrect format or time exceeded 512
no_result No result 513
deprecated_parameter Parameter should no longer be used at this time 514

DLR (Reports - History)

  • POST
  • LISTE DES PARAMETRES
  • TABLE DES EREURS
Obtenir les rapports des envois SMS
 
 
Example 1
 
sms_id :: ddeefff
token : aabbcc
 
curl -X POST "https://ivoiresms.ci/pages/api/dlr.php" -d "token=aabbcc&sms_id=ddeefff" -H "curlopt_ssl_verifypeer:false"
 
Example 2
 
date_after ::: 2024/01/06 00:00 AM
token : aabbcc
 
curl -X POST "https://ivoiresms.ci/pages/api/dlr.php" -d "token=aabbcc&date_after=2024-01-06-00-00" -H "curlopt_ssl_verifypeer:false"
 
Example 3
 
date_before:: 2024/01/06 23:59 PM
token : aabbcc
 
curl -X POST "https://ivoiresms.ci/pages/api/dlr.php" -d "token=aabbcc&date_before=2024-01-06-23-59" -H "curlopt_ssl_verifypeer:false"
 
Example 4
 
date_after ::: 2024/01/06 00:00 AM
date_before:: 2024/01/06 23:59 PM
token : aabbcc
 
curl -X POST "https://ivoiresms.ci/pages/api/dlr.php" -d "token=3GmSQ2luB6Shz6va8oW9vIfaYDPLBnp7139NMhZtQVmWJ9y6EA&date_before=2024-01-06-23-59&date_after=2024-01-06-00-00" -H "curlopt_ssl_verifypeer:false"
 
 
   
Vous recevrez un JSON Data du type
 
  {
      "data": {        
        "result": {{"id":"DQBIcUTKMXk8yc9CQ1xvNV7R8QEj9NxlniDjEtaX1JIcSJcvLR","smsCount":"1","balanceSMSbefore":"997","createdAt":"2023-08-26 23:13:03","sender":"aabbccc","text":"Ceci est un test","bulk_sms":"1","recipients":[2250141883544],"failed":[]}},
        "comment": "null"
        }
 }
 
En cas d'erreur, vous recevrez un JSON Data du type
• Le type et la description de l'erreur peuvent être trouvés dans l'onglet "TABLE DES ERREURS",
• Le code de l'erreur represente les "http error" que vous pouvez retrouver en tapant sur un moteur de recherche (google.com, etc)
 
SENDER (Exemple)
 
AUTHENTIFICATION (Exemple)
{
      "type": "no_result",
      "code": 513,
      "error": "No result ",
      "detail": null
 }
  {
      "type": "unauthorized",
      "code": 400,
      "error": "Unauthorized Access",
      "detail": null
 }
 
PARAMETER VALUE
MANDATORY
DEFAULT VALUE
REQUEST
token Set TOKEN into your SMS account or please contact the service provider
yes
-
login Set login API into  your SMS account or please contact the service provider
false
-
mdp Set Password API into  your SMS account or please contact the service provider
false
-
sms_id Set the SMS ID which is the object of the search
false
-
date_after Set the start date of the search (format : yyyy-mm-dd-hh-ii) e.g : 2021-05-01-08-10. Example : 2021/05/01 08H10 mn
Timezone : UTC
false
-
date_before Set the end date of the search (format : yyyy-mm-dd-hh-ii) e.g : 2021-05-01-08-10. Example : 2021/05/01 08H10 mn
Timezone : UTC
false
-
page Set the number of a page to consult. one page contains 1000 records.
false
-
RESPONSE
result JSON response details
yes
-
comment Important information to know
false
-
Type Description Http Status Code
unauthorized Unauthorized Access 400
unauthorized Unauthorized Access or use GET/POST Method 401
invalid_sender Invalid sender. Please, you must register this sender into your dashboard account or contact your provider
501
invalid_phone_number Invalid number or incorrect parameter 502
invalid_message Message must not exceed 160 characters 503
invalid_message Message must not exceed 160 characters 504
invalid_scheduled_date Invalid scheduled date or incorrect format or time exceeded 505
empty_message Empty message or incorrect parameter 506
no_recipients No recipients or incorrect parameter 507
bulk_sms_disabled Bulk SMS is disabled 508
low_credit Insufficient funds 509
delivrance_issue Delivrance Issue. Please check or contact your provider 510
invalid_date_after Invalid date_after or incorrect format or time exceeded 511
invalid_date_before Invalid date_before or incorrect format or time exceeded 512
no_result No result 513
deprecated_parameter Parameter should no longer be used at this time 514
traffic International traffic is closed 515
schedule_date schedule date is disabled 516

Crédits / Bonus SMS

  • POST
  • LISTE DES PARAMETRES
  • TABLE DES EREURS
Consulter le crédit SMS restant / Générer un TOKEN
 
 
 
 
curl -X POST \https://ivoiresms.ci/pages/api/info.php \
-H "curlopt_ssl_verifypeer: false " \
-d "{
  "token": "A générer dans votre compte SMS",
  "login": "FACULTATIF",
  "mdp": "FACULTATIF",
  "bonus_reverse": 0,
  "change_api_access": 0
  }"
 
Example 1
 
token : aabbcc
>> Only resets the API token, login and password
change_api_access : 1
 
curl -X POST "https://ivoiresms.ci/pages/api/info.php" -d "token=aabbcc&change_api_access=1" -H "curlopt_ssl_verifypeer:false"
 
Example 2
 
token : aabbcc
bonus_reverse : 1 // Authorize the transfer of the SMS bonus into the SMS balance of your account
 
curl -X POST "https://ivoiresms.ci/pages/api/info.php" -d "token=aabbcc&bonus_reverse=1" -H "curlopt_ssl_verifypeer:false"
 
Example 3
 
token : aabbcc
Consults the API token, login and password
 
curl -X POST "https://ivoiresms.ci/pages/api/info.php" -d "token=aabbcc" -H "curlopt_ssl_verifypeer:false"
   
Vous recevrez un JSON Data du type
 
  {
      "data": {        
        "credit_sms": 500,
        "bonus": 0,
        "login_api_new": "",
        "mdp_api_new": "",
        "datetime": "2021-04-14-08:10:01"
        }
 }
 
En cas d'erreur, vous recevrez un JSON Data du type
• Le type et la description de l'erreur peuvent être trouvés dans l'onglet "TABLE DES ERREURS",
• Le code de l'erreur represente les "http error" que vous pouvez retrouver en tapant sur un moteur de recherche (google.com, etc)
 
SENDER (Exemple)
 
AUTHENTIFICATION (Exemple)
{
      "type": "invalid_sender",
      "code": 501,
      "error": "Invalid sender. Please, you must register this sender into your dashboard account or contact your provider",
      "detail": null
 }
  {
      "type": "unauthorized",
      "code": 400,
      "error": "Unauthorized Access",
      "detail": null
 }
 
PARAMETER VALUE
MANDATORY
DEFAULT VALUE
REQUEST
token Set TOKEN into your SMS account or please contact the service provider
yes
-
login Set login API into  your SMS account or please contact the service provider
false
-
mdp Set Password API into  your SMS account or please contact the service provider
false
-
bonus_reverse 0: No action
1: Reverse bonus into a Principal Account
false
0
change_api_access 0: No action
1: Change TOKEN, Login API and Paswword API
false
0
RESPONSE
credit_sms Value of Account's credit SMS
yes
-
bonus Value of bonus Account's credit sms
yes
-
login_api_new Value of new Login API
false
-
mdp_api_new Value of new Password API
false
-
token_api_new Value of new TOKEN API
false
-
status_account 0: Your account SMS is disabled
1: your account SMS is activated
yes
-
datetime Time of return response
yes
-
Type Description Http Status Code
unauthorized Unauthorized Access 400
unauthorized Unauthorized Access or use GET/POST Method 401