1️Authentication APIs (3)

The authentication apis are prerequisite to use address book api and other apis

Step 1: Get Session API

GET https://api.socialinviter.com/api/v2/session

This API will provide the session key and the list of all available services for the APP. This session key should be used in all the other API calls.

Note: The session key is valid for 24 hours

Query Parameters

{
  "data": {
    "session": "5ccb85414453180155beb049",
    "authUrl": "https://yourdomain.com/oauth.html",
    "services": [
      {
        "id": "google"
      },
      {
        "id": "yahoo"
      },
      {
        "id": "outlook"
      }
    ]
  },
  "status": {
    "type": "success",
    "message": ""
  }
}

Step 2: Get Authentication URL API

Note: For apple service, please directly call get token API.

GET https://api.socialinviter.com/api/v2/auth

This API allows you to get the authentication URL, then redirect the user to this auth URL for authentication.

Query Parameters

Headers

{
  "data": {
    "authurl": "<Authentication url will be here>",
    "service": "google"
  },
  "status": {
    "type": "success",
    "message": ""
  }
}

Step 3: Get Token API

The below video shows how to get the "code" after authenticating your user.

3.1 > Get Token API (For all services other than APPLE)

POST https://api.socialinviter.com/api/v2/accesstoken

Get access token that will be used to fetch the address book.

Headers

Request Body

{
  "data": {
    "service": "google",
    "token": "xxxxxxxxxxxxxxxxxxxxxxx",
    "userid": "xxxxxxxxxx"
  },
  "status": {
    "message": "",
    "type": "success"
  }
}

3.2 > Get Token API (Only for APPLE service)

POST https://api.socialinviter.com/api/v2/accesstoken

Get access token that will be used to fetch the address book.

Headers

Request Body

{
  "data": {
    "service": "apple",
    "token": "xxxxxxxxxxxxxxxxxxxxxxx",
    "userid": "xxxxxxxxxx"
  },
  "status": {
    "message": "",
    "type": "success"
  }
}

Last updated