/
3003: Add social connection

3003: Add social connection

Connects an account with a specific social media.


Endpoint ID:3003
Method:POST
URL:

/entity/id/{entity-id}/social-connections

/entity/ext-key/{ext-key}/{ext-type}/social-connections



entity-id

Rubiq entity ID that uniquely identifies an account to add social connection to


ext-key

External key that uniquely identifies an account to add social connection to


ext-type

Type of external key

Request body:

JSON data with information about type of social media (currently only Facebook), social media id and social media access token

Required fields:

 type “facebook”:

appID (Facebook AppID)

userID

accessToken,

accessTokenExpires (UTC timestamp for when access token expires. Expected format is a standard ISO UTC date – generated in javascript like this:Date().toJSON();)

Example
{
	"type": "facebook",
	"appID": 987654321,
	"userID": 123456789,
	"accessToken": "...",
	"accessTokenExpires": "2014-05-02T14:17:33Z"
}

Response body:

JSON data with information about the newly created social connection

Example – Account was just successfully connected to Facebook:
{
	"id": 1234,
	"type": "facebook",
	"appID": 987654321,
	"userID": 123456789,
	"accessToken": "...",
	"accessTokenExpires": "2014-05-02T14:17:33Z"
}
Status codes:201

Connection created successfully


303

Account is already connected to the specified social media


404

Social media with the type and id is already connected to another account

 

The following sub codes may be returned:

 

404.1User not found
404.2External user could not be found
404.4Facebook appID not recognised



404

Account was not found

Related content

2121: Submit data request
2121: Submit data request
More like this
1010: Determine track connection
1010: Determine track connection
More like this
9002: Connect entity
9002: Connect entity
More like this
2001: Authenticate
2001: Authenticate
More like this
2123: Complete data request action
2123: Complete data request action
More like this
1009: Enumerate tracks
1009: Enumerate tracks
More like this