Python example


# -*- coding: utf-8 -*-
from urllib import request
import json

token = 'Your token' #Your first token must be generated on our plateform at https://secure.smsfactor.com/token.html
content = 'Test API python' 
numbers = ('33601020304', '33704030201')
recipients = [];
for number in numbers:
  recipients.append({'value': number})

data = {
  'sms': {
    'message': {
      'text': content
    },
    'recipients': {
      'gsm': recipients
    }
  }
}

data = json.dumps(data).encode('utf-8')

req = request.Request('https://api.smsfactor.com/send', data)
req.add_header('Accept', 'application/json')
req.add_header('Authorization', "Bearer %s" % token)

with request.urlopen(req, data) as f:
  print(f.read().decode('utf-8'))