- Basic Information Terminology, getting started and setting up your account. Recommended for new customers.
- Make your website social Step-by-step tutorials and information on how to integrate our plugins and services to your site.
- REST API Reference JSON/REST API for advanced social network integration. Must-read for developers.
Connection API \ Read connection details
A connection contains the result of an interaction between one of your users and one of our plugins. If the connection contains a user profile from a social network (Facebook, Twitter ...), this data is wrapped into the Portable Contacts Format. Please note that the user profile may contain more or less data depending on the provider.
Workflow Example
- You have deployed the Social Login Plugin on your website.
- One of your users uses the plugin to sign in with Facebook.
- The plugin sends a
POSTto your callback url. - You extract the a
connection_tokenfrom thePOSTdata. - You use the
connection_tokento get the connection details (including the user's Facebook profile data).
Send a GET request to the following resource to retrieve the details of a connection.
The <format> might either be json or xml. The <connection_token> has to
be replaced by the unique token that your received from one of our social plugins.
| Resource/URI | GET | POST | PUT | DELETE |
Connections
/connections.<format>
|
List all connections | – | – | – |
Connection
/connections/<connection_token>.<format>
|
Read connection details | – | – | – |
Example of a successfull connection to a social network:
{
"response": {
"request": {
"date": "Thu, 25 Aug 2011 13:38:21 0200",
"resource": "/connections/8875cb47-9b2e-40f9-8ae0-8428c06937a9.json",
"status": {
"flag": "success",
"code": 200
}
},
"result": {
"status": {
"flag": "success",
"code": 200,
"info": "The user successfully authenticated"
},
"data": {
"connection": {
"connection_token": "8875cb47-9b2e-40f9-8ae0-8428c06937a9",
"date": "Thu, 25 Aug 2011 13:35:40 +0200",
"plugin": "social_link"
},
"user": {
"user_token": "12345678-1234-1234-1234-123456789012",
"identity": {
"identity_token": "a3ba5j55-aacc-25ag-a4ah-ga4ahab3a2aa",
"provider": "twitter",
"id": "http://twitter.com/ExampleUser",
"displayName": "Firstname Lastname",
"name": {
"formatted": "Firstname Lastname"
},
"preferredUsername": "MyUserNameRocks",
"thumbnailUrl": "http://a1.twimg.com/sticky/default_profile_images/default_profile_6_normal.png",
"urls": [{
"value": "http://twitter.com/ExampleUser",
"type": "profile"
}
],
"accounts": [{
"domain": "twitter.com",
"userid": "123456789",
"username": "ExampleUser"
}
],
"photos": [{
"value": "http://a1.twimg.com/sticky/default_profile_images/default_profile_6_normal.png",
"type": "thumbnail"
}
]
}
}
}
}
}
}
Example for a failed connection to a social network:
{
"response":{
"request":{
"date":"Thu, 25 Aug 2011 14:03:17 0200",
"resource": "/connections/8875cb47-9b2e-40f9-8ae0-8428c06937a9.json",
"status":{
"flag": "success",
"code": 200
}
},
"result":{
"status":{
"flag": "error",
"code": 401,
"info": "The user did not authenticate successfully"
},
"data":{
"plugin":{
"name": "social_link"
}
}
}
}
}