Location
/api/apps/{appID}/integration/twitter
Point of integration with Twitter,
allows to sign up
with Twitter credentials
Request Headers (Applies to all methods)
Authorization
header
Required: Yes
POST
/api/apps/{appID}/integration/twitter
Description
Request a new token
Security
Can access with all credentials, except anonymous
Content-Type application/vnd.kii.AuthTokenTwitterRequest+json
All the required information from Twitter to request a token. 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
expiresAt
long
The expiration date of the token.
The date should be in UNIX epoch time in milliseconds.
Sample Request
{
"accessToken": "[string]",
"accessTokenSecret": "[string]",
"expiresAt": "[long]"
}
Responses
200
Content-Type application/json
Successfully got a token
Contents
Name | Type | Description |
---|---|---|
id | string | The ID of the principal (user or thing). |
access_token | string | The access token issued by the authorization server. |
expires_in | long | The lifetime of the access token (in seconds). |
token_type | string | The token type. Only "Bearer" is supported. |
refresh_token | string | The new refresh token. |
400
Content-Type application/json
Could not get a token
Contents
Name | Type | Description |
---|---|---|
errorCode | string | Oauth2 error code: "invalid_grant" or "unsupported_grant_type". |
error_description | string | The error description. |
error | string | Oauth2 error code |