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

NameTypeDescription

license*

string

The license which you can get from your SocialInviter account.

{
  "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

NameTypeDescription

service*

string

name of the service you want to authenticate, eg: google, yahoo, outlook etc. See the full supported list of services under Supported Services

redirecturl

string

(MOSTLY NEEDED IF YOU ARE NOT USING oauth.html)

if you want to override the redirect URL provided in your license settings, pass this parameter

product*

string

name of the product, eg: contactimporter, socialpost ,socialconnect

Headers

NameTypeDescription

session*

string

Session which you received from session API

{
  "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

NameTypeDescription

session*

string

Session which you received from session API

content-type*

string

Value should be as belowapplication/x-www-form-urlencoded

Request Body

NameTypeDescription

service*

string

name of the service, eg: google, yahoo, outlook etc. See the full supported list of services under Supported Services section

code*

string

Code value which you received in QueryString on oauth.html page after authentication redirection

The example format should be -> abc:123

product*

string

name of the product, eg: contactimporter, socialpost ,socialconnect

{
  "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

NameTypeDescription

session*

string

session which you received from session API

content-type*

string

Value should be as below application/x-www-form-urlencoded

Request Body

NameTypeDescription

service*

string

name of the service, eg: apple

email*

string

Email id of the user

password*

string

App-specific password or password

product*

string

name of the product, eg: contactimporter, socialpost ,socialconnect

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

2️pageAddress Book APIpageSupported ServicespageError Handling

Last updated