Links

What to do with your Payload?

SAWO's SDK returns a payload which can be used in various methods. Some of them are explained below.

Dummy Payload

The Payload of an API Module is the body of your request and response message. It contains the data that you send to the server when you make an API request. You can send and receive Payload in different formats, for instance JSON.
On successful authentication, SAWO's SDK returns a payload that is similar to the JSON that is shown below:
Payload : {
"user_id":"123e4567-e89b-12d3-a456-426614174000",
"created_on":"2021-08-04T15:11:41.396000Z",
"identifier":"[email protected]",
"identifier_type":"email",
"verification_token":"0IH0beD9Fue7rJcLmkauQomAfpRmkRpFsi6d",
"customFieldInputValues":{
"Name":"John",
"Company Name":"SAWO Labs"
}
}
This is a dummy payload that is shown above where,
user_id is a unique string that is generated when a user has been successfully authenticated. created_on contains the date and time of the authentication. identifier holds the value of your email-id or phone-number. identifier_type is the type of identifier that the user has defined. verification_token is a unique string that is used to authenticate customFieldInputValues is an object where it contains details of a key of the name of the field and value contains the value of that field.
On successful authentication, the payload would come as a response and it was be utilised in various manners. Some of them are:

Storing Data to Database

The payload returned by us is a JSON, as SAWO believes in user data autonomy and we believe that we as the B2B provider should never be storing the data, we just send a JSON file which you can by running a simple API store into your database.

Managing Session Storage

The payload contains a verification token that can be used to maintain sessions as a challenge happens with the string combination of the verification token with the private key. This can be helpful to store sessions in a user's machine.

CRM

The data that comes along with the payload can be fed into the CRM system so that the companies are connected to customers, streamline processes, and improve the overall experience.