POST login/apps/:app id/sign ins
(Difference between revisions)
Ivan.filho (Talk | contribs) (→Response) |
|||
Line 31: | Line 31: | ||
== Response == | == Response == | ||
− | + | === Response Status === | |
+ | |||
+ | {| | ||
+ | ! align="left" width="200px" | ok (201) | ||
+ | | Credential created succesfully. | ||
+ | |- | ||
+ | ! align="left" width="200px" | unauthorized (401) | ||
+ | | The authentication is wrong. See [[Authentication]]. | ||
+ | |- | ||
+ | ! align="left" width="200px" | not_found (404) | ||
+ | | The user was not found. | ||
+ | |- | ||
+ | ! align="left" width="200px" | not_found (403) | ||
+ | | The credential is invalid. | ||
+ | |- | ||
+ | ! align="left" width="200px" | internal_server_error (500) | ||
+ | | An unknown error happened. | ||
+ | |} | ||
+ | |||
+ | === Response Body === | ||
+ | |||
+ | {| | ||
+ | ! align="left" width="200px" | type | ||
+ | | Credential Social App type, "facebook", "twitter", "linkedin", "gplus", "instagram" or "apple". | ||
+ | |- | ||
+ | ! align="left" width="200px" | access_token | ||
+ | | Credential access token. | ||
+ | |- | ||
+ | ! align="left" width="200px" | access_secret | ||
+ | | Credential access secret. | ||
+ | |- | ||
+ | ! align="left" width="200px" | provider_id | ||
+ | | Credential provider identifier. | ||
+ | |- | ||
+ | ! align="left" width="200px" | created_at | ||
+ | | Credential created timestamp. | ||
+ | |- | ||
+ | ! align="left" width="200px" | updated_at | ||
+ | | Credential last updated timestamp. | ||
+ | |} | ||
== Examples == | == Examples == |
Revision as of 14:02, 23 March 2020
Contents |
Description
Creates a new sign_in given an user_id.
Resource URL
POST https://api.socialidnow.com/v1/marketing/login/apps/:app_id/sign_ins
Parameters
URL Parameters
app_id | required | Social Login App identifier. |
---|
JSON Parameters
sign_in | required | a hash with user_id field. |
---|
Authentication
This API requires Marketing Account authentication. See Authentication.
Response
Response Status
ok (201) | Credential created succesfully. |
---|---|
unauthorized (401) | The authentication is wrong. See Authentication. |
not_found (404) | The user was not found. |
not_found (403) | The credential is invalid. |
internal_server_error (500) | An unknown error happened. |
Response Body
type | Credential Social App type, "facebook", "twitter", "linkedin", "gplus", "instagram" or "apple". |
---|---|
access_token | Credential access token. |
access_secret | Credential access secret. |
provider_id | Credential provider identifier. |
created_at | Credential created timestamp. |
updated_at | Credential last updated timestamp. |
Examples
Request
curl -iX POST 'https://api.socialidnow.com/v1/marketing/login/apps/:app_id/sign_ins' \ -d '{"sign_in": {"user_id":<user_id>}}' \ -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/4735 Status: 201
Response Body
{ "connection":"https://api.socialidnow.com/v1/marketing/login/connections/a4b4cee9c05774d8b6e2427818f8e7866363eff0ea6c69edec8ac32dd0b71452", "connection_id":"a4b4cee9c05774d8b6e2427818f8e7866363eff0ea6c69edec8ac32dd0b71452", "login_token":"184cbcf30260b81d061e1f3903bf372089b48c7f5c1fd90649e14b6f17ed6a56", "user_id":340 }