Social API

Access Token

copy-icon
curl -X GET \
'https://api.loginradius.com/api/v2/access_token?Secret=&Token=' \
-H 'Cache-Control: no-cache' \
-H 'content-Type: application/json' \

The above command returns JSON structured like this:

copy-icon
{
"access_token": "a123qwe2-9**3-4202-833c-320aoo58**66",
"expires_in": "2017-10-09T06:07:00.296Z"
}

This API Is used to translate the Request Token returned during authentication into an Access Token that can be used with other API calls.

HTTP Request

Get /api/v2/access_token?Secret=&Token=

Query Parameters

ParameterDefaultDescription
SecretnoneLoginRadius API Secret [Required]
TokennoneToken generated from a successful oauth from social platform [Required]

Token Validate

copy-icon
curl -X GET \
'https://api.loginradius.com/api/v2/access_token/Validate?access_token=&Key=&Secret=' \
-H 'Cache-Control: no-cache' \
-H 'content-Type: application/json' \
-H 'Authorization: Bearer ' \

The above command returns JSON structured like this:

copy-icon
{
"access_token": "a123qwe2-9**3-4002-833c-3****o58cf66",
"expires_in": "2017-10-09T06:07:00.296Z"
}

This API validates access token, if valid then returns a response with its expiry otherwise error.

HTTP Request

Get /api/v2/access_token/Validate?access_token=&Key=&Secret=

Query Parameters

ParameterDefaultDescription
access_tokennoneUniquely generated identifier key by LoginRadius that is activated after successful authentication. [Required]
KeynoneLoginRadius API Key [Required]
SecretnoneLoginRadius API Secret [Required]

Access Token Invalidate

copy-icon
curl -X GET \
'https://api.loginradius.com/api/v2/access_token/inValidate?access_token=&Key=&Secret=' \
-H 'Cache-Control: no-cache' \
-H 'content-Type: application/json' \
-H 'Authorization: Bearer ' \

The above command returns JSON structured like this:

copy-icon
{
"isPosted": true
}

This api invalidates the active access token or expires an access token validity.

HTTP Request

Get /api/v2/access_token/inValidate?access_token=&Key=&Secret=

Query Parameters

ParameterDefaultDescription
access_tokennoneUniquely generated identifier key by LoginRadius that is activated after successful authentication. [Required]
KeynoneLoginRadius API Key [Required]
SecretnoneLoginRadius API Secret [Required]

Get Active Session Details

copy-icon
curl -X GET \
'https://api.loginradius.com/api/v2/access_token/activeSession?Key=&Secret=&Token=' \
-H 'Cache-Control: no-cache' \
-H 'content-Type: application/json' \

The above command returns JSON structured like this:

copy-icon
{
"data": [
{
"AccessToken": "8h******-****-8**5-***c-e8c*******9b",
"Browser": "Chrome",
"Device": "PC",
"Os": "Windows",
"DeviceType": "Computer",
"City": "****",
"Country": "a**d",
"Ip": "***.0*6.1*2.**1",
"LoginDate": "2017-10-02T10:02:52.534Z"
}
],
"nextcursor": 0
}

This api is use to get all active session by Access Token.

HTTP Request

Get /api/v2/access_token/activeSession?Key=&Secret=&Token=

Query Parameters

ParameterDefaultDescription
KeynoneLoginRadius API Key [Required]
SecretnoneLoginRadius API Secret [Required]
TokennoneToken generated from a successful oauth from social platform [Required]

Get Active Session By Account Id

copy-icon
curl -X GET \
'https://api.loginradius.com/api/v2/access_token/activeSession?AccountId=&Key=&Secret=' \
-H 'Cache-Control: no-cache' \
-H 'content-Type: application/json' \

The above command returns JSON structured like this:

copy-icon
{
"data": [
{
"AccessToken": "8h******-****-8**5-***c-e8c*******9b",
"Browser": "Chrome",
"Device": "PC",
"Os": "Windows",
"DeviceType": "Computer",
"City": "****",
"Country": "a**d",
"Ip": "***.0*6.1*2.**1",
"LoginDate": "2017-10-02T10:02:52.534Z"
}
],
"nextcursor": 0
}

This api is used to get all active sessions by AccountID(UID).

HTTP Request

Get /api/v2/access_token/activeSession?AccountId=&Key=&Secret=

Query Parameters

ParameterDefaultDescription
AccountIdnoneUID, the unified identifier for each user account [Required]
KeynoneLoginRadius API Key [Required]
SecretnoneLoginRadius API Secret [Required]

Get Active Session By Profile Id

copy-icon
curl -X GET \
'https://api.loginradius.com/api/v2/access_token/activeSession?Key=&ProfileId=&Secret=' \
-H 'Cache-Control: no-cache' \
-H 'content-Type: application/json' \

The above command returns JSON structured like this:

copy-icon
{
"data": [
{
"AccessToken": "8h******-****-8**5-***c-e8c*******9b",
"Browser": "Chrome",
"Device": "PC",
"Os": "Windows",
"DeviceType": "Computer",
"City": "****",
"Country": "a**d",
"Ip": "***.0*6.1*2.**1",
"LoginDate": "2017-10-02T10:02:52.534Z"
}
],
"nextcursor": 0
}

This api is used to get all active sessions by ProfileId.

HTTP Request

Get /api/v2/access_token/activeSession?Key=&ProfileId=&Secret=

Query Parameters

ParameterDefaultDescription
KeynoneLoginRadius API Key [Required]
ProfileIdnoneSocial Provider Id [Required]
SecretnoneLoginRadius API Secret [Required]

User Profile

copy-icon
curl -X GET \
'https://api.loginradius.com/api/v2/userprofile?Access_Token=&Fields=' \
-H 'Cache-Control: no-cache' \
-H 'content-Type: application/json' \
-H 'Authorization: Bearer ' \

The above command returns JSON structured like this:

copy-icon
{
"Password": "********************",
"LastPasswordChangeDate": "2018-03-05T22:13:36.48263Z",
"PasswordExpirationDate": "2028-02-07T19:02:55.803Z",
"LastPasswordChangeToken": "1542daac-4df0-4270-b5b5-5d7922492d7e",
"EmailVerified": false,
"IsActive": true,
"IsDeleted": false,
"Uid": "ffa5884ec3a943db8b5484f0d18e2fde",
"CustomFields": {
"CustomField1": "Custom data value 1 ",
"CustomField2": "Custom data value 2"
},
"IsEmailSubscribed": false,
"UserName": "Johndoe123",
"NoOfLogins": 7,
"PreviousUids": "61432e56***1495e89d3a100e36aeb8b",
"PhoneId": "+16045552368",
"PhoneIdVerified": false,
"ExternalUserLoginId": "Johndoe123",
"RegistrationProvider": "Email",
"IsLoginLocked": false,
"LoginLockedType": "None",
"LastLoginLocation": "Vancouver, Canada",
"RegistrationSource": "API",
"IsCustomUid": false,
"UnverifiedEmail": [
{
"Type": "Secondary",
"Value": "abc@example.com"
}
],
"IsSecurePassword": true,
"ID": "0e0d1f048d8844408315aeb100f39649",
"Provider": "Email",
"Prefix": "Dr.",
"FirstName": "John",
"MiddleName": "Doe",
"LastName": "Order",
"Suffix": "Sr.",
"FullName": "John Doe Order",
"NickName": "Johnny",
"ProfileName": "Johnny",
"BirthDate": "10-12-1985",
"Gender": "M",
"Website": "www.example.com",
"Email": [
{
"Type": "Primary",
"Value": "example@example.com"
}
],
"Country": {
"Code": "ca",
"Name": "Canada"
},
"ThumbnailImageUrl": "https://example.com/image_thumb.png",
"ImageUrl": "https://example.com/image_full.png",
"Favicon": "https://example.com/image_fav.png",
"ProfileUrl": "https://example.com/profile",
"HomeTown": "Vancouver",
"State": "British-Columbia",
"City": "Vancouver",
"Industry": "IT",
"About": "I keep track of the latest trends",
"TimeZone": "-8",
"LocalLanguage": "en-US",
"CoverPhoto": "https://example.com/profile/cover/cover_img.png",
"TagLine": "To be or not to be, that is the question",
"Language": "en-US",
"Verified": true,
"UpdatedTime": "2018-02-06T19:02:55.803Z",
"Positions": [
{
"Position": "astronaut",
"Summary": "An astronaut.",
"StartDate": "2008-02-07T19:02:55.803Z",
"EndDate": "2015-02-07T19:02:55.803Z",
"IsCurrent": "false",
"Location": "Houston",
"Comapny": {
"Name": "NASA",
"Type": "astronaut",
"Industry": "National secure"
},
"Company": {
"Name": "NASA",
"Type": "astronaut",
"Industry": "National secure"
}
}
],
"Educations": [
{
"School": "UCL",
"year": "2010",
"type": "student",
"notes": "great",
"activities": "sports",
"degree": "master",
"fieldofstudy": "astronaut",
"StartDate": "2004-02-07T19:02:55.803Z",
"EndDate": "2005-02-07T19:02:55.803Z"
}
],
"PhoneNumbers": [
{
"PhoneType": "Mobile",
"PhoneNumber": "+16045552368"
}
],
"IMAccounts": [
{
"AccountType": "primary",
"AccountName": "Example"
}
],
"Addresses": [
{
"Type": "Primary",
"Address1": "1281 West Mall",
"Address2": "Room 121",
"City": "Edmonton",
"State": "Alberta",
"PostalCode": "546841",
"Region": "Myself",
"Country": "Canada"
}
],
"MainAddress": "1281 West Mall rm 121",
"Created": "5/20/2008 12:33:35 AM +00:00",
"CreatedDate": "2018-03-05T22:13:36.2013716Z",
"ModifiedDate": "2018-03-05T22:13:36.48263Z",
"LocalCity": "Vancouver",
"ProfileCity": "Vancouver",
"LocalCountry": "Canada",
"ProfileCountry": "Canada",
"FirstLogin": false,
"IsProtected": false,
"RelationshipStatus": "Single",
"Quota": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"Quote": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"InterestedIn": [
"female"
],
"Interests": [
{
"InterestedType": "Sports",
"InterestedName": "Badminton"
}
],
"Religion": "Undecided",
"Political": "Undecided",
"Sports": [
{
"Id": "23423534563463466",
"Name": "Badminton"
}
],
"InspirationalPeople": [
{
"Id": "234523234323423423432424",
"Name": "Bill Gates"
}
],
"HttpsImageUrl": "https://www.example.com/profile/image.png",
"FollowersCount": 70,
"FriendsCount": 800,
"IsGeoEnabled": "false",
"TotalStatusesCount": 11,
"Associations": "Board of Canada",
"NumRecommenders": 3,
"Honors": "Valedictorian",
"Awards": [
{
"Id": "001",
"Name": "One of Smith",
"Issuer": "Lord Smith"
}
],
"Skills": [
{
"Id": "123",
"Name": "C++"
}
],
"CurrentStatus": [
{
"Id": "328",
"Text": "Gone for help",
"Source": "examplesource",
"CreateDate": "2006-02-07T19:02:55.803Z"
}
],
"Certifications": [
{
"Id": "512",
"Name": "Engineer certification",
"Authority": "The Great Engineer Association",
"Number": "1",
"StartDate": "2006-02-07T19:02:55.803Z",
"EndDate": "2007-02-07T19:02:55.803Z"
}
],
"Courses": [
{
"Id": "888",
"Name": "Advanced Algorithm",
"Number": "1"
}
],
"Volunteer": [
{
"Id": "456",
"Role": "Teacher",
"Organization": "The Great Wall",
"Cause": "Teaching people to defend the Wall"
}
],
"RecommendationsReceived": [
{
"Id": "846",
"RecommendationType": "Primary",
"RecommendationText": "The Great Wall",
"Recommender": "King"
}
],
"Languages": [
{
"Id": "484",
"Name": "Latin",
"Proficiency": "Business"
}
],
"Projects": [
{
"Id": "789",
"Name": "Night Watcher",
"Summary": "Defend the wall",
"With": [
{
"Id": "555",
"Name": "Meng"
}
],
"StartDate": "2010-02-07T19:02:55.803Z",
"EndDate": "2011-02-07T19:02:55.803Z",
"isCurrent": "false"
}
],
"Games": [
{
"Id": "777",
"Name": "Battleship",
"Category": "Strategy",
"CreateDate": "2010-10-07T19:02:55.803Z"
}
],
"Family": [
{
"Id": "055",
"Name": "Robb Smith",
"Relationship": "Brother"
},
{
"Id": "056",
"Name": "Eddard Smith",
"Relationship": "Father"
}
],
"TeleVisionShow": [
{
"Id": "777",
"Name": "Getting out",
"Category": "Comedy",
"CreateDate": "2011-02-07T19:02:55.803Z"
}
],
"MutualFriends": [
{
"Id": "060",
"Name": "Robb Smith",
"FirstName": "Robb",
"LastName": "Smith",
"Birthday": "2000-08-24T12:21:41.808Z",
"Hometown": "Vancouver",
"Link": "classmate",
"Gender": "M"
},
{
"Id": "061",
"Name": "Sansa Smith",
"FirstName": "Sansa",
"LastName": "Smith",
"Birthday": "2000-08-24T12:21:41.808Z",
"Hometown": "Vancouver",
"Link": "classmate",
"Gender": "F"
}
],
"Movies": [
{
"Id": "788",
"Name": "Le Voyage dans la Lune",
"Category": "Sci-Fi",
"CreateDate": "2017-02-07T19:02:55.803Z"
}
],
"Books": [
{
"Id": "788",
"Name": "Macbeth",
"Category": "Theatre",
"CreateDate": "2000-01-15T19:02:55.803Z"
}
],
"AgeRange": {
"Min": "15",
"Max": "20"
},
"PublicRepository": 5,
"Hireable": false,
"RepositoryUrl": "https://api.example.com/users/johnnyd/repos",
"Age": "32",
"Patents": [
{
"Id": "516",
"Title": "Machine that flies",
"Date": "2009-02-07T19:02:55.803Z"
}
],
"FavoriteThings": [
{
"Id": "781",
"Name": "BasketBall",
"Type": "Sports"
}
],
"ProfessionalHeadline": "Always, ready",
"ProviderAccessCredential": {
"AccessToken": "**************************************",
"TokenSecret": "**************************************"
},
"RelatedProfileViews": [
{
"Id": "884",
"FirstName": "Jemery",
"LastName": "Fir"
}
],
"KloutScore": {
"KloutId": "51656",
"Score": "52.0"
},
"LRUserID": "user32134",
"PlacesLived": [
{
"Name": "Allision road",
"IsPrimary": "True"
}
],
"Publications": [
{
"Id": "51656",
"Title": "ASA",
"Publisher": "Fisher",
"Authors": [
{
"Id": "51",
"Name": "Darker"
}
],
"Date": "1997-02-07T19:02:55.803Z",
"Url": "whatwebsite.com",
"Summary": "What would you do as soon as you can?"
}
],
"JobBookmarks": [
{
"IsApplied": "true",
"ApplyTimestamp": "541",
"IsSaved": "false",
"SavedTimestamp": "588",
"Job": {
"Active": "true",
"Id": "51",
"DescriptionSnippet": "Darker",
"Compony": {
"Id": "489",
"Name": "Night Watch"
},
"Position": {
"Title": "Commander"
},
"PostingTimestamp": "988"
}
}
],
"Suggestions": {
"CompaniestoFollow": [
{
"Id": "568",
"Name": "Amazon"
}
],
"IndustriestoFollow": [
{
"Id": "695",
"Name": "Software"
}
],
"NewssourcetoFollow": [
{
"Id": "352",
"Name": "NewYorkFans"
}
],
"PeopletoFollow": [
{
"Id": "845",
"Name": "Anna Smith"
}
]
},
"Badges": [
{
"BadgeId": "531",
"Name": "MVP",
"BadgeMessage": "Most Valuable Person",
"Description": "An award to triple double",
"ImageUrl": "www.imageMVP.com"
}
],
"MemberUrlResources": [
{
"Url": "www.memberurl.com",
"UrlName": "MemberURL"
}
],
"TotalPrivateRepository": 0,
"Currency": "CAD",
"StarredUrl": "www.image.com",
"GistsUrl": "www.gists.com",
"PublicGists": 0,
"PrivateGists": 0,
"Subscription": {
"Name": "test",
"Space": "none",
"PrivateRepos": "testRepo1",
"Collaborators": "John"
},
"Company": "Night Watch",
"GravatarImageUrl": "www.gravatar.com/avatar/*********************",
"ProfileImageUrls": {
"Image Url": "https://example.com.com/*****/picture?type=small",
"ThumbnailImage Url": "https://example.com/*****/picture?type=square"
},
"WebProfiles": {
"Small": "https://graph.facebook.com/*****/picture?type=small",
"Square": "https://graph.Profile.com/*****/picture?type=square",
"Large": "https://graph.facebook.com/*****/picture?type=large",
"Profile": "https://graph.facebook.com/******/picture?type=normal"
},
"PinsCount": 2,
"BoardsCount": 3,
"LikesCount": 20,
"SignupDate": "2018-03-05T22:13:36.2013716Z",
"LastLoginDate": "0001-01-01T00:00:00"
}

The User Profile API is used to get social profile data from the user's social account after authentication.

Supported Providers: All

HTTP Request

Get /api/v2/userprofile?Access_Token=&Fields=

Query Parameters

ParameterDefaultDescription
Access_TokennoneUniquely generated identifier key by LoginRadius that is activated after successful authentication. [Required]
FieldsnoneThe fields parameter filters the API response so that the response only includes a specific set of fields [Optional]

NativeSocial API

Access Token via Facebook Token

copy-icon
curl -X GET \
'https://api.loginradius.com/api/v2/access_token/facebook?Fb_Access_Token=&Key=' \
-H 'Cache-Control: no-cache' \
-H 'content-Type: application/json' \

The above command returns JSON structured like this:

copy-icon
{
"access_token": "87******-****-***7-*****-******c***f2",
"expires_in": "2017-10-09T09:37:35.4884699Z"
}

The API is used to get LoginRadius access token by sending Facebook's access token. It will be valid for the specific duration of time specified in the response.

HTTP Request

Get /api/v2/access_token/facebook?Fb_Access_Token=&Key=

Query Parameters

ParameterDefaultDescription
FbAccessTokennoneFacebook Access Token [Required]
KeynoneLoginRadius API Key [Required]

Access Token via Twitter Token

copy-icon
curl -X GET \
'https://api.loginradius.com/api/v2/access_token/twitter?Key=&Tw_Access_Token=&Tw_Token_Secret=' \
-H 'Cache-Control: no-cache' \
-H 'content-Type: application/json' \

The above command returns JSON structured like this:

copy-icon
{
"access_token": "87******-****-***7-*****-******c***f2",
"expires_in": "2017-10-09T09:37:35.4884699Z"
}

The API is used to get LoginRadius access token by sending Twitter's access token. It will be valid for the specific duration of time specified in the response.

HTTP Request

Get /api/v2/access_token/twitter?Key=&Tw_Access_Token=&Tw_Token_Secret=

Query Parameters

ParameterDefaultDescription
KeynoneLoginRadius API Key [Required]
TwAccessTokennoneTwitter Access Token [Required]
TwTokenSecretnoneTwitter Token Secret [Required]

Access Token via Google Token

copy-icon
curl -X GET \
'https://api.loginradius.com/api/v2/access_token/google?Google_Access_Token=&Key=&client_id=&refresh_token=' \
-H 'Cache-Control: no-cache' \
-H 'content-Type: application/json' \

The above command returns JSON structured like this:

copy-icon
{
"access_token": "e******f-***5-4**2-***8-1d6******8a6",
"refresh_token": "b*****44-****-4***-****-182***94***6",
"expires_in": "2018-11-20T13:28:40.2339631Z"
}

The API is used to get LoginRadius access token by sending Google's access token. It will be valid for the specific duration of time specified in the response.

HTTP Request

Get /api/v2/access_token/google?Google_Access_Token=&Key=&client_id=&refresh_token=

Query Parameters

ParameterDefaultDescription
GoogleAccessTokennoneGoogle Access Token [Required]
KeynoneLoginRadius API Key [Required]
client_idnoneGoogle Client ID [Optional]
refresh_tokennoneLoginRadius refresh token [Optional]