Location
/api/apps/{appID}/users/{userID}/qq/link
This resource allows to link the accessed user with
a
QQ account.
Request Headers (Applies to all methods)
Authorization
header
Required: Yes
POST
/api/apps/{appID}/users/{userID}/qq/link
Description
Link the accessed user with QQ.
Security
Only the administrator and the user himself can access this method.
Content-Type application/vnd.kii.LinkQQRequest+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 QQ.
openID
Yes
string
The openID value from QQ.
Sample Request
{
"accessToken": "[string]",
"openID": "[string]"
}
Responses
204
Content-Type (None)
The user has been linked with the QQ 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.QQUserAlreadyLinkedException+json
The user was already linked with a QQ account.
Contents
Name | Type | Description |
---|---|---|
errorCode | string | Error code "QQ_USER_ALREADY_LINKED". |
message | string | The error message. |
qqID | string | The QQID of the user. |