Direct Connect \ Social Link

With Social Link your users can link their existing accounts to one or more social networks and then use the Social Login service to login to your website. Social Link can be embedded either by using JavaScript or by using Direct Connect which works without any JavaScript or iFrames.

1. Trigger the social network authentication

To link/unlink a social network the user has to login with that social network account first. To start the authentication you need to send the user to a specific URL called Direct Connect URL. You could for example place that URL on a hyperlink so that the user triggers the social network authentication when he clicks on the link.


Your must replace the following placeholders in the Direct Connect URL by your own values.

Placeholder Description
* #subdomain# The subdomain of your OneAll site.
Example: myshop
* #provider_key# The key of the social network to link/unlink.
Example: twitter, facebook, linkedin, vimeo [...]

Required URL Parameters

You must add the following URL parameters to the Direct Connect URL.

Required URL Parameter Description
* service The service to be used , must be social_link
Example: &service=social_link
* callback_uri The url encoded link to the callback script on your server.
Example: &
* action Whether to link (link_identity) or unlink (unlink_identity) the social network account. Example: &action=link_identity

Upon successful authentication the social network account will either be linked or unlinked depening upon the value of the action parameter. If you have specified a user_token then the social network account will be un/linked from/to that token.

Optional URL parameters

There are a number of optional URL parameters can be added to the Direct Connect URL.

Optional URL Parameter Description
scope Defines the permission scope to request from the social network.
Default: Compiled from the options that you have ticked in your OneAll account.
Example: &scope=user_birthday,user_hometown
force_reauth Set to false to do not ask the user to re-enter his social network credentials.
Default: true
Example: &force_reauth=true
login_data Sets the login data to be used, eg. the OpenID URL.
Default: none
Example: &
user_token The user_token of the user that links/unlinks the social network account.
If you already have a user_token for the user, then it must be specified, otherwise leave it emtpy
Example: &user_token=44dd647d-0ce1-448e-9009-9f7d68973637

The user_token is a unique identifier that you receive from the OneAll API whenever a user connects with Social Login or links an account with Social Link.

If the user has never used Social Login or Social Link then you might not have a user_token for that user yet. In this case just leave the user_token empty to have our API create a new token.

At the first use of Social Login or Social Link you must store the user_token for that user in your database and specify it in any subsequent uses of Social Link by the same user.

2. Retrieve the user's social network profile data

After the authentication the user is redirected to the specified callback_uri to which the OneAll API adds the GET parameter connection_token. Your callback_uri can fetch the status of the operation by sending a request with that token to the Read Connection Details resource of the OneAll API.

User Contributed Notes