API Get User Info

Step 1: Retrieving User ID from the URL 

When initiating wallet recharge, EasySocial appends a unique user ID to the wallet recharge URL(provided by the partner). This ID is specific to each user and looks like this. 
Learn how to setup custom Wallet recharge URL.

https://your-partner-url.com/wallet_recharge?user_id=123456

OR 

if you have saved the user id during the account setup process, you may use the same id to proceed to the next step. Learn how to get a user id.

Step 2: Fetching User Information with User Info Auth API 
Using the appended User ID, you'll first call the User Info Auth API. This will generate a signature required for further actions.

GET

https://partners-api.easysocial.in/:userId/user-info-auth


:userId - This field needs to be updated with the user id which was retrieved in step 1.

Sample header payload

{
    "token":"466d2e086a8f4f24bcb70789fee"
}


Example Response 

{
  "status": 200,
  "success": true,
  "message": "success",
  "payload": "/api/3562/get-user-info?signature=eyJtZXNzYWdlIjoiL2FwaS8zNTYyL2dldC11c2VyLWluZm8iLCJleHBpcnlEYXRlIjoiMjAyNC0wNS0zMVQxMzowNDo1NS4xMzVaIn0.mw0Z6T2UvBxs_6GwZpxMVuUyE5WE7VtTPzevZln2eVY"
}


Step 3: Retrieving Detailed User Information 
With the signature generated from the previous API call (step 2) and the business ID(step 1), you can now call the Get User Info API to retrieve all relevant information about the business, such as the current plan details and the upcoming plan (if any).

GET

https://partners-api.easysocial.in/:userId/get-user-info?signature=eyJtZXNzYWdlIjoiL2FwaS8zNTYyL2dldC11c2VyLWluZm8iLCJleHBpcnlEYXRlIjoiMjAyNC0wNS0zMVQxMzowNTozMi43NTBaIn0.T3-mVZ_WKAd6o5FP3Hp4AMlZeWiJt6CkZpxvXSsyJMI


Sample header payload

{
    "token":"466d2e086a8f4f24bcb70789fee"
}


Example Response  

{
    "status": 201,
    "success": true,
    "message": "User Information.",
    "payload": {
        "ownedBusiness": [
            00
        ],
        "userInfo": {
            "id": 00,
            "name": "Test",
            "mobile_number": "+91XXXXXXXXXX",
            "email": "test@test.com",
            "address": null,
            "city": "XXXX",
            "state": "XXXX",
            "country": "XXXX",
            "pin_code": null
        },
        "walletInfo": {
            "currency": "INR",
            "balance": 0,
            "user_id": 0
        }
    }
}


KEY PARAMETERS

  • Token- The "Partner API access token" to authenticate the request.
  • User Id- User Id is a unique identifier given by EasySocial for each user.