Provisioning SMS and MMSC User Accounts via HTTP

Posted by on Feb 19, 2012 in Support Blog

NowSMS has long supported external account provisioning via HTTP as described in the article at https://nowsms.com/provisioning-sms-and-mmsc-user-accounts-via-http.

The purpose of this article is to document additional parameters supported in more recent versions of NowSMS.

This provisioning interface is enabled whenever one or more user accounts is defined in NowSMS under “SMS Users” with the “Enable Admin Access” checked.

This interface is accessed via the NowSMS web interface port, with a URI of “/provision” followed by a series of “HTTP GET” parameters. (The admin username and password must be supplied in the HTTP GET request within an “Authorization:” header using HTTP Basic Authentication, or they can be be appended to the URL as parameters such as /provision?user=username&password=password.  Using URL parameters for provisioning authentication is supported only in NowSMS 2012.01.10 and later.)

Two different provisioning request formats are defined, one for defining “SMS Users” accounts, and a second for defining “MMSC Users” accounts.

If a parameter of “Type=SMS” is specified, the following parameters are supported:

AdminAction=Add, Modify, Delete, or CreditCheck

Name=Account Name

Password=password

Fullname=Full Name

EnableWebLogin=Yes/No

EnableSmppLogin=Yes/No

EnableSmtpLogin=Yes/No

ForcedSenderAddress=Sender Address

RestrictIPAddress=list of IP addresses

EnableCreditBalance=Yes/No

CreditsToAdd=####

MessageLimitDefault=Yes/No

MessageLimitPerDay=####

MessageLimitPerMonth=####

RecipientAddresses=list of recipient phone numbers that should be routed to this account

WebOptions=All/Advanced/TextOnly/Text/SMSMMS/SMSWAPMM/SMSMMSWAPMM

AdminEnabled=Yes/No (version 2011.10.18 and later)

ReceiveEnabled=Yes/No (version 2011.10.18 and later)

As an example, to add credits to an existing account, issue the following URL request:

http://server:port/provision?Type=SMS&AdminAction=Modify&Name=accountname&CreditsToAdd=100

Assuming that the user is authorized to issue a provisioning command (valid username/password, and supported IP address for originating the request), the server will return a normal HTTP response code of 200 with a MIME content type of “text/plain”. The response will start with “OK” if the request was successful, or “ERROR” if the request failed. If a”CreditsToAdd” parameter was specified, or “AdminAction=CreditCheck”, the HTTP response will include the text “Credits=####”, where “####” is the current balance for the account.

If a parameter of “Type=MMS” is specified, the following parameters are supported:

AdminAction=Add, Modify, Delete, or CreditCheck

PhoneNumber=phonenumber

Name=Alias

Password=password

Fullname=Full Name

MessageLimitDefault=Yes/No

MessageLimitPerDay=####

MessageLimitPerMonth=####

For comments and further discussion, please click here to visit the NowSMS Technical Forums (Discussion Board)...