Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Use /entity routing instead of /user

...

Excerpt

Connects an account with a specific social media.



Endpoint ID:3003
Method:
Status
colourGreen
titlePOST
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();)


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



Span
stylewhite-space:pre

Response body:


JSON data with information about the newly created social connection

Code Block
titleExample – 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