PUT api/Session/Social
Login a user to establish a session from a social login
Request Information
URI Parameters
None.
Body Parameters
The login data used to create the session
SessionSocialLoginDataName | Description | Type | Additional information |
---|---|---|---|
UserName |
The user name / login email of the donor account |
string |
None. |
SocialAccountId |
The account id in the social provider (facebook, twitter) |
string |
None. |
SocialProvider |
The Social Provider type. Note: LoginTypes.Email is not allowed |
SocialLoginProvider |
None. |
Request Formats
application/json, text/json
Sample:
{ "UserName": "sample string 1", "SocialAccountId": "sample string 2", "SocialProvider": 0 }
application/xml, text/xml
Sample:
<SessionSocialLoginData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Caf.DonorSystem.Mobile.WebApi.Models"> <SocialAccountId>sample string 2</SocialAccountId> <SocialProvider>Twitter</SocialProvider> <UserName>sample string 1</UserName> </SessionSocialLoginData>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
ApiResultOfSessionName | Description | Type | Additional information |
---|---|---|---|
Entity | Session |
None. |
|
HasErrors |
True if there are any errors present |
boolean |
None. |
Errors |
The list of errors |
Collection of ApiResultError |
None. |
Response Formats
application/json, text/json
Sample:
{ "Entity": null, "HasErrors": true, "Errors": [ { "Code": 0, "ErrorType": "sample string 1", "Message": "sample string 2" }, { "Code": 0, "ErrorType": "sample string 1", "Message": "sample string 2" } ] }
application/xml, text/xml
Sample:
<ApiResultOfSessiont13cTSzo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Caf.DonorSystem.Mobile.WebApi.Models"> <Errors> <ApiResultError> <Code>InvalidParameterAddressMissing</Code> <ErrorType>sample string 1</ErrorType> <Message>sample string 2</Message> </ApiResultError> <ApiResultError> <Code>InvalidParameterAddressMissing</Code> <ErrorType>sample string 1</ErrorType> <Message>sample string 2</Message> </ApiResultError> </Errors> <Entity i:nil="true" /> </ApiResultOfSessiont13cTSzo>