Check a message sender
const url = 'https://api.siprtc.io/v1/Accounts/AC000000000000000000/MsgSenders/US/%2B15555550100';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.siprtc.io/v1/Accounts/AC000000000000000000/MsgSenders/US/%2B15555550100 \ --header 'Authorization: Basic <credentials>'Tells you whether a sender may be used as the From of messages from the account in the path. It is allowed when caller-ID checks are turned off for the account, when it is an approved sender ID of the account (any country), or when it is a number on the account with the sms capability. The answer is a JSON string: “success” with 200 when allowed, “failure” with 401 when the sender is not on the account, and “success” with 401 when the number is on the account but cannot send SMS. A 401 here is the check’s answer, not an authentication failure.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Your Auth ID (or a direct child’s).
Example
AC000000000000000000Country of the destination; accepted but not used by the check.
Example
USThe sender ID or number, with or without +.
Example
+15555550100Responses
Section titled “ Responses ”Allowed: ‘success’
Example generated
exampleA path parameter is missing
object
Human-readable result or error.
Success or failed.
Example
{ "message": "phone number not found", "status": "failed"}Not allowed (‘failure’ or ‘success’; see the description), or missing or invalid credentials (from the API gateway)
Example generated
example