Location
/api/apps/{appID}/users/{accountType}:{address}/twitter/link
This resource allows to link the accessed user with
a
Twitter account.
Request Headers (Applies to all methods)
Authorization
header
Required: Yes
POST
/api/apps/{appID}/users/{accountType}:{address}/twitter/link
Description
Link the accessed user with Twitter.
Security
Only the administrator and the user himself can access this method.
Content-Type application/vnd.kii.LinkTwitterRequest+json
The needed data to link the user. application/json can be used as content-type for the compatibility.
Name
Required?
type
Description
Authorization
Yes
string
Authorization header. OAuth2 Bearer token
Name
Required?
Type
Description
accessToken
Yes
string
The access token of the user from Twitter.
accessTokenSecret
Yes
string
The access token secret of the user from Twitter.
Sample Request
{
"accessToken": "[string]",
"accessTokenSecret": "[string]"
}
Responses
204
Content-Type (None)
The user has been linked with the Twitter account
successfully.
Note
This response has no contents.
404
Content-Type application/vnd.kii.UserNotFoundException+json
The user was not found.
Contents
Name | Type | Description |
---|---|---|
errorCode | string | Error code "USER_NOT_FOUND". |
message | string | The error message. |
field | string | The field used for searching the user. This can be the userID or address field. |
value | string | The field value used for searching the user. |
appID | string | The ID of the application. |
401
Content-Type application/vnd.kii.UnauthorizedAccessException+json
Not authorized to link the user.
Contents
Name | Type | Description |
---|---|---|
errorCode | string | Error code "UNAUTHORIZED". |
message | string | The error message. |
authenticatedAppID | string | The authenticated appID. |
authenticatedPrincipalID | string | The authenticated principal ID (userID or thingID). |
409
Content-Type application/vnd.kii.TwitterUserAlreadyLinkedException+json
The user was already linked with a Twitter account.
Contents
Name | Type | Description |
---|---|---|
errorCode | string | Error code "TWITTER_USER_ALREADY_LINKED". |
message | string | The error message. |
twitterID | string | The Twitter ID of the user. |