The Social Login access_token validation API endpoint allows you to verify the user_info object obtained after successful social login by a user on the login page. Upon successful login, the access_token can be used to fetch the user_info object. access_token is only valid for 15 minutes.


Type of Request: GET


Full URL: https://shopsocially.com/ss_user/validate_access_token


Request Parameters:


The following table outlines the request parameters that you can use with this endpoint.


Parameter

Value

Description

access_token

access_token string

(Required) The access_token string obtained after successful login by user.


On a successful request, this API endpoint returns the following JSON response containing user_info object. The meaning of the various fields in the response is included in the following response.


{

“data” : user_info // refer user_info support page

“success” : true

}



Example:


Below is a sample example of the API request should look and what the response looks like. We show the example using the command-line tool curl, but you can use any programming language you want to consume the API.

An example request will look like this -


curl --header "partner-id: <your-partner-id>" --header "api-key: <your-api-key>" https://shopsocially.com/ss_user/validate_access_token?access_token=<your-access_token>


{

"data": {

   "first_name": "Steve",

   "access_token": "ZNBsSPFiA5qJkzCu18wGsP5ZwsScx94lyoivaU2XBTKRxmus",

  "ss_user_id": "540d9397fa0eaa5cb55b2087",

   "network_type": "google",

   "last_name": "Smith",

   "email": stevesmith1664@gmail.com,

   "google": {

         "gender": "male",

         "date_of_birth": "",

         "image_url": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=50",

         "google_user_id": "111818501983077212308"

   }

   },

"success": true

}