Skip to main content

Integrated RapidSOS Portal (iRP) API1.0.0

iRPv1 is now discontinued.

This API Documentation is for existing iRPv1 integrations. No new integrations will be completed with iRPv1. New iRP integrations will only be approved using iRPv2.

iRPv1 is Discontinued

New development for iRPv1 API is discontinued. While we will continue to support existing integrations using iRPv1, RapidSOS will not approve new integrations developed using it. RapidSOS encourages partners to upgrade to iRPv2 in 2022 to enable Partner ECCs to benefit from additional safety, feature, and functionality updates. iRPv1 will not benefit from new feature releases or improvements including:

  • Increased security,
  • Simple login accessibility,
  • Autonomous reception of additional data from. Sirius XM, Simplisafe, Honeywell, Geocomm, and CRG,
  • Autonomous UI/UX improvements like screen re-sizing and ECC UI/UX customization, 
  • Autonomous product capability like Agency Share and Chat and Texting, and
  • Future API development with Alerts (Alarm solution), Emergency Data Exchange (EDX), and 911 CPE solution interoperability.

iRPv2 - Seamless Upgrade

Your existing credentials with your ECCs and PSAPs will continue to work with iRPv2, too. Each ECC will have one Client ID and Client Secret (usually stored in a configuration file) which is part of the process that renews the login on each query, preventing unknown sign-outs and interruption in service. 

Upgrade Today!

To make sure your integration has the latest security, features, and interoperability by upgrading to iRPv2, please contact partners@rapidsos.com or your RapidSOS Partner contact.

 

Overview

RapidSOS offers this API endpoint for partners interested in adding RapidSOS Portal directly into their pre-existing solution.

Using any login for RapidSOS Portal, a token can be retrieved which can be used in the RapidSOS Portal URL to authenticate. This allows a seamless automatic display of rich data as rendered by the Portal.

 

RapidSOS Portal 

The following URL is used to authenticate to the RapidSOS Portal:

Portal URL

https://api-sandbox.rapidsos.com/v1/scorpius/user/api-token-auth

 

A user object is required to enter this endpoint. The user object stores information about the logged-in user, returned by the identity provider. It is generated when a user authenticates and before rules run.This token (user object) is the equivalent of a RapidSOS Portal login.

This can be created through the admin panel using the add user feature:

  1. Enter the email address and Password > Press Login
  2. Select > Admin
  3. Select > Users tab
  4. Select > Add User
  5. Fill out the required information (first name, last name, email, role) and press > SAVE

Add User

 

 

API Utilization

Both users and administrators can generate auth tokens for this feature.

Here is some important information when working with this endpoint:

  • POST Requests

The endpoint accepts POST requests in application/json format. The header should be Content-Type: application/json.

  • Body of a Request

The body of the request should consist of the email address and password of the Rapidsos Portal account that is being leveraged in the integration.

  • Response of a Request

The response of the request will be a refresh_token and a token. The token portion will be used in the url.

 

Query URL Creation

Once the integrated solution completes the API request, it should take the token contained within the response, and along with the phone number, create the query URL as shown below.

https://rapidsosportal.com/query-interface?caller_id=15555555555&access…{TOKEN}

Where {TOKEN} refers to the token from the response of the token API.

With the token, that URL will open an instance of RapidSOS Portal in the browser in which it is entered.

Integrated solutions can use this link in an embedded web widget, but are recommended to use an OS system call to pop open the system’s default web browser for display (details of usage are up to the maintainers of each integrated solution).

IMPORTANT: The login session enabled by this token will be valid for 1 hour.

 

Implementation Flow

The following diagram depicts an integration flow when implementing a web browser/widget.

 

Code Sample

Script to receive an access token from /api-token-auth:

import requests
import argparse
import getpass
import json
def get_login_token(creds):
        url = 'https://api-sandbox.rapidsos.com/v1/scorpius/user/api-token-auth'
        email = creds.email
        password = creds.password
        payload_dict = {
                'email': f"{email}",
                'password': f"{password}"
        }
        payload = json.dumps(payload_dict)
        headers = {
                'Content-Type':"application/json"
        }
        response = requests.request("POST", url, data=payload, headers=headers)
        print("This is your token:","\n",(json.loads(response.text)['token'])
if __name__ == '__main__':
    parser = argparse.ArgumentParser(
        description="""Generate a user token for Rapidsos Portal.
        Press CTRL+C to terminate early.
        """
    )
    parser.add_argument(
        '-e',
        '--email',
        required=True,
        help='Email associated with the Rapidsos Portal account'
    )
    parser.add_argument(
        '-p',
        '--password',
        required=True,
        help='Password associated with the Rapidsos Portal account'
    )
    args = parser.parse_args()
    get_login_token(args)

 

 

Additional Reference

 

 

 

About us

We build APIs that share data with first responders to help protect lives.