Emulate Brevo (formerly Sendinblue)

Learn how to quickly modify your existing Brevo API calls to send SMS messages using the SMS Gateway Emulator app. With minimal code changes, you can switch from Brevo services to our app, saving costs and gaining full control over your SMS gateway.

There are 2 ways to emulate Brevo API.

  1. Change the API url directly.

  2. Via our Proxy Server.

Whatever you do, make sure to change the API_KEY to EMULATOR_API_KEY, and set EMULATOR_SENDER_ID.

Brevo Official Documents

https://developers.brevo.com/reference/createsmscampaign-1

curl

curl --request POST \
     --url https://api.brevo.com/v3/smsCampaigns \
     --header 'accept: application/json' \
     --header 'api-key: 123456' \
     --header 'content-type: application/json' \
     --data '
{
  "recipients": {
    "listIds": [
      "phoneNumber"
    ]
  },
  "unicodeEnabled": false,
  "name": "name",
  "sender": "sender",
  "content": "Hello from Brevo"
}
'
curl --request POST \
     --url https://api.smsgatewayemulator.com/v3/smsCampaigns \
     --header 'accept: application/json' \
     --header 'api-key: $EMULATOR_API_KEY' \
     --header 'content-type: application/json' \
     --data '
{
  "recipients": {
    "listIds": [
      "phoneNumber"
    ]
  },
  "unicodeEnabled": false,
  "name": "name",
  "sender": "$EMULATOR_SENDER_ID",
  "content": "Hello from Brevo"
}
'
curl --request POST \
     --url https://api.brevo.com/v3/smsCampaigns \
     --header 'accept: application/json' \
     --header 'api-key: $EMULATOR_API_KEY' \
     --header 'content-type: application/json' \
     --data '
{
  "recipients": {
    "listIds": [
      "phoneNumber"
    ]
  },
  "unicodeEnabled": false,
  "name": "name",
  "sender": "$EMULATOR_SENDER_ID",
  "content": "Hello from Brevo"
}
' \
--cacert ./sms_gateway_emulator_ca.crt \
--proxy https://proxy.smsgatewayemulator.com \
--proxy-cacert ./sms_gateway_emulator_ca.crt

Python

import requests

url = "https://api.brevo.com/v3/smsCampaigns"

payload = {
    "recipients": { "listIds": ["phoneNumber"] },
    "unicodeEnabled": False,
    "name": "name",
    "content": "Hello from Brevo",
    "sender": "sender"
}
headers = {
    "accept": "application/json",
    "content-type": "application/json",
    "api-key": "123456"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
import requests

url = "https://api.smsgatewayemulator.com/v3/smsCampaigns"

payload = {
    "recipients": { "listIds": ["phoneNumber"] },
    "unicodeEnabled": False,
    "name": "name",
    "content": "Hello from Brevo",
    "sender": EMULATOR_SENDER_ID
}
headers = {
    "accept": "application/json",
    "content-type": "application/json",
    "api-key": EMULATOR_API_KEY
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)


< Home page



© 2024 SMS Gateway Emulator
Privacy Policy | Terms of Use