POST login/apps/:app id/sign ins/twitter
From Social ID Developers
(Difference between revisions)
(2 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | + | == Description == | |
+ | |||
+ | Creates a new sign_in given a Twitter credential. | ||
+ | |||
+ | Use this API when you already have your own Twitter authentication mechanism. With this API you can keep on using all Social Login APIs and plugins and populating your Database with new users. | ||
+ | |||
+ | Important: if you use the user token in any Javascript API you will have to get a the new one generated by this operation using [[GET login/users/:user_id]]. See [[Social Login Tokens]] for more details. | ||
+ | |||
+ | == Resource URL == | ||
+ | |||
+ | POST https://api.socialidnow.com/v1/marketing/login/apps/:app_id/sign_ins/twitter | ||
+ | |||
+ | == Parameters == | ||
+ | |||
+ | === URL Parameters === | ||
+ | |||
+ | {| | ||
+ | ! align="left" width="200px" | app_id | ||
+ | | width="200px" | required | ||
+ | | Login App identifier. | ||
+ | |} | ||
+ | |||
+ | === JSON Parameters === | ||
+ | |||
+ | {| | ||
+ | ! align="left" width="200px" | access_token | ||
+ | | width="200px" | required | ||
+ | | user Twitter access_token. | ||
+ | |- | ||
+ | ! align="left" width="200px" | access_secret | ||
+ | | width="200px" | required | ||
+ | | user Twitter access_secret. | ||
+ | |} | ||
+ | |||
+ | == Authentication == | ||
+ | |||
+ | This API requires Account authentication. See [[Authentication]]. | ||
+ | |||
+ | == Response == | ||
+ | |||
+ | Same as [[GET login/sign_ins/:id]]. | ||
+ | |||
+ | == Examples == | ||
+ | |||
+ | === Request === | ||
+ | |||
+ | curl -iX POST 'https://api.socialidnow.com/v1/marketing/login/apps/:app_id/sign_ins/twitter' \ | ||
+ | -d '{"access_token":"<access_token>", "access_secret": "<access_secret>"}' \ | ||
+ | -H 'Content-type:application/json' \ | ||
+ | --user <api_id>:<api_secret> | ||
+ | |||
+ | === Response === | ||
+ | |||
+ | ==== Response Headers ==== | ||
+ | |||
+ | HTTP/1.1 201 Created | ||
+ | Location: https://api.socialidnow.com/v1/marketing/login/sign_ins/4748 | ||
+ | Status: 201 | ||
+ | |||
+ | ==== Response Body ==== | ||
+ | |||
+ | { | ||
+ | "connection":"https://api.socialidnow.com/v1/marketing/login/connections/a4b4cee9c05774d8b6e2427818f8e7866363eff0ea6c69edec8ac32dd0b71452", | ||
+ | "connection_id":"a4b4cee9c05774d8b6e2427818f8e7866363eff0ea6c69edec8ac32dd0b71452", | ||
+ | "login_token":"184cbcf30260b81d061e1f3903bf372089b48c7f5c1fd90649e14b6f17ed6a56", | ||
+ | "user_id":340 | ||
+ | } |
Latest revision as of 16:54, 30 December 2021
Contents |
Description
Creates a new sign_in given a Twitter credential.
Use this API when you already have your own Twitter authentication mechanism. With this API you can keep on using all Social Login APIs and plugins and populating your Database with new users.
Important: if you use the user token in any Javascript API you will have to get a the new one generated by this operation using GET login/users/:user_id. See Social Login Tokens for more details.
Resource URL
POST https://api.socialidnow.com/v1/marketing/login/apps/:app_id/sign_ins/twitter
Parameters
URL Parameters
app_id | required | Login App identifier. |
---|
JSON Parameters
access_token | required | user Twitter access_token. |
---|---|---|
access_secret | required | user Twitter access_secret. |
Authentication
This API requires Account authentication. See Authentication.
Response
Same as GET login/sign_ins/:id.
Examples
Request
curl -iX POST 'https://api.socialidnow.com/v1/marketing/login/apps/:app_id/sign_ins/twitter' \ -d '{"access_token":"<access_token>", "access_secret": "<access_secret>"}' \ -H 'Content-type:application/json' \ --user <api_id>:<api_secret>
Response
Response Headers
HTTP/1.1 201 Created Location: https://api.socialidnow.com/v1/marketing/login/sign_ins/4748 Status: 201
Response Body
{ "connection":"https://api.socialidnow.com/v1/marketing/login/connections/a4b4cee9c05774d8b6e2427818f8e7866363eff0ea6c69edec8ac32dd0b71452", "connection_id":"a4b4cee9c05774d8b6e2427818f8e7866363eff0ea6c69edec8ac32dd0b71452", "login_token":"184cbcf30260b81d061e1f3903bf372089b48c7f5c1fd90649e14b6f17ed6a56", "user_id":340 }