Set up Twilio

The Messages resource, with HTTP Basic auth. smsyra answers exactly as Twilio would, keeps the text in your inbox, checks it against your DLT templates — and sends nothing.

What to change

smsyra URL for Twilio
https://api.shriradhatechnologies.com/p/twilio/2010-04-01/Accounts/YOUR_ACCOUNT_SID/Messages.json
Method
POST
Your key goes in
the Basic-auth password (your account SID as the user)
Instead of
https://api.twilio.com/2010-04-01/Accounts/{sid}/Messages.json
  1. Swap https://api.twilio.com for the smsyra URL above up to /p/twilio — a Twilio SDK takes it as its base URL (or an HTTP client override).
  2. Keep your AccountSid as the Basic-auth user and in the path: smsyra echoes it and never checks it.
  3. Put your smsyra key where the auth token goes (the Basic-auth password).
  4. Twilio sends no DLT ids, so smsyra finds the matching template by the text itself.

Need a key? Create a free workspace and make one on its API keys page — it starts with smy_.

Send a test text

curl -X POST "https://api.shriradhatechnologies.com/p/twilio/2010-04-01/Accounts/YOUR_ACCOUNT_SID/Messages.json" \
  -u "YOUR_ACCOUNT_SID:smy_YOUR_KEY" \
  --data-urlencode "To=+919876543210" \
  --data-urlencode "From=ACMEOT" \
  --data-urlencode "Body=482913 is your ACME login code. It is valid for 10 minutes."

What smsyra answers

The same status and body Twilio gives when it takes a text (HTTP 201), so your code carries on as it would in production:

{"sid":"SM5f1d…","account_sid":"YOUR_ACCOUNT_SID","to":"+919876543210","from":"ACMEOT","body":"482913 is your ACME login code. It is valid for 10 minutes.","status":"queued","num_segments":"1","direction":"outbound-api",…}

The text itself shows up in your inbox the moment it arrives, with the DLT result: Matched, Mismatched (with the first character that differs), or No template.

Test the failures

Each API key has a failure mode, so you can test your retries and error handling without breaking anything. More about failure modes.

Whensmsyra answers
A key that is unknown or revokedYour provider's authentication error. Nothing is kept.HTTP 401
{"code":20003,"message":"Authenticate","more_info":"https://www.twilio.com/docs/errors/20003","status":401}
Failure mode: Provider errorThe provider's own error. The text is kept as “Simulated error”.HTTP 500
{"code":20500,"message":"Internal Server Error","more_info":"https://www.twilio.com/docs/errors/20500","status":500}
Failure mode: Provider downA 503, as if the provider were down. The text is kept as “Simulated outage”.HTTP 503
{"code":20503,"message":"Service Unavailable","more_info":"https://www.twilio.com/docs/errors/20503","status":503}
Failure mode: SlowWaits as long as you set (up to 30 seconds), then answers normally.The normal answer (HTTP 201), after the wait.
Strict DLT on, and the text doesn't matchRefused the way the provider refuses a DLT failure. The text is kept as “Refused (strict DLT)”.HTTP 400
{"code":21901,"message":"DltTemplateId is invalid","more_info":"https://www.twilio.com/docs/errors/21901","status":400}

Read the OTP in your tests

Ask for the newest code sent to a number. The call waits up to 30 seconds for the text to arrive, so a test never sleeps and polls. It takes your key as Authorization: Bearer smy_…, whichever provider sent the text. The OTP API in full.

curl -G "https://api.shriradhatechnologies.com/v1/otp/latest" \
  -H "Authorization: Bearer smy_YOUR_KEY" \
  --data-urlencode "to=9876543210" \
  --data-urlencode "wait=25"

It answers HTTP 200 with the code, or 404 NO_MESSAGE after the wait:

{"messageId":"0193…","to":"+919876543210","from":"ACMEOT","body":"482913 is your ACME login code. It is valid for 10 minutes.","code":"482913","codeMethod":"template","candidates":["482913"],"receivedAt":"2026-11-15T10:20:30Z","templateId":"1007123456789012345","dlt":{"status":"MATCHED"}}

Other providers

AmazeSMS · MSG91 (Flow v5) · Fast2SMS · Exotel · smsyra JSON