SMS From Me

Automatically Start One on One SMS Conversations

SMS From Me REST API -- Access

REST API Access

No Authorizations

A few paths can be used to access various data without the need for an OAuth Authentication. For example, the registration form checks to know whether your email address is already used for one of our users. This is done through our REST API without the need for a OAuth Authentication (since at that time you do not even have an account!)

OAuth Authorization

The REST API is accessible at /api/1/... with a valid HTTP Authorization header with an OAuth access token, which is current (did not yet time out.) There is an example of how that HTTP header may look like:

Authorization: Bearer 0123456789abcde0123456789abcde0123456789abcdefff0123456789abcdef

Note: we currently only use "Bearer" as the token type, however, it could change in the future. It is highly recommended that you use the token type as returned by the OAuth system.

The Authorization HTTP header must be included in all the REST API accesses.

If the authorization is not valid (incorrect Authorization HTTP header or the token timed out) then an error occurs. At this time we do not redirect your application to the OAuth page to get your token. This will have to be a manual step on your end.

There is a cURL example using PHP:

...
$curl = curl_init("https://smsfromme.com/api/1/message");
...
curl_setopt(
    $curl,
    CURLOPT_HTTPHEADER,
    array("Authentication: " . $token_type . " " . $access_token));
...

There is a URL and HttpURLConnection example using Java:

...
url = new URL("https://smsfromme.com/api/1/message");
connection = (HttpURLConnection) url.openConnection();
connection.setRequestProperty("Authorization", token_type + " " + access_token);
...
connection.connect();
...

The path always starts with /api/1/... and uses additional segments to decribe the user, message, and other objects being worked on. Different pages describe each different path. The number 1 after /api represents the API version. At this time we only support version 1.

User Logged In Authentication

In some cases the specific function requires you to be logged in to function. These functions are used by our JavaScript code and only work if you have a valid cookie which will log you in and let you access otherwise inaccessible commands.

Verifications

The REST API verifies that:

  • The OAuth token is valid (when required)
  • The user is logged in (when required)
  • The path to the API function is valid
  • The API version being used is compatible with the server
  • The method used is allowed on that path (we currently support GET, POST, DELETE, PATCH, PUT, NEXT)

If any one of those checks fail, then the REST access fails immediately with an error.

 

Login

 

Register

If you already registered with your email address and needed to re-validate (i.e. the first validation somehow failed) then go to the Validate Page where you can request for a new validation code to be emailed to you.

Login         Register         Get App.
 

Get My Free Book About SMS Marketing

Hey! Before you leave, make sure to get my freeBook About SMS Marketing. All you have to do is enter your email address and I'll send you a link to this website where you can retrieve your own copy of my free book.

Connect With Us
Google Plus Button
LinkedIn Button
YouTube Button