Login API

 

/Authenticated/v2/Auth

Request Type
POST
 
Used to complete the authentication process between your website and Stitchz while also obtaining an OAuth2 token for future, secure authorized requests. It is required to use HTTPS when POSTing your authenticated request back to Stitchz.To initiate the authentication process start with /v2/Authenticate
 
Example URL
https://example.stitchz.net/Authentication/v2/Auth
 
Request
Required Parameter Type Description
yes AppSecret string Your unique application secret
yes Token string A one time unique token provided by Stitchz to your application during the logon authentication process. Pass this token back to complete the authentication process.
  Format string The format of the authenticated Stitchz response, XML, JSON, JSONP. The default response is in "XML" format.
  Version string The version of the request, "v2". Version 2 is for OAuth2 calls
Response**
Field Type Description
id* string Unique identifier for the authenticated user as sent by the login provider.
displayName string The name of the authenticated user, suitable for display to end-users. Could be a full name, username, or handle.
preferredUsername string The primary username for the authenticated user when the login provider asks for one during sign up.
nickName string The casaul way to address the authenticated user in real life; not a username.
givenName string The authenticated user's first or primary name
familyName string The authenticated user's last or family name
middleName string The authenticated user's middle name
image url URL of a photo of the authenticated user.
url url URL of a web page relating to the authenticated user.
identifier* string A unique identifier that spans across all login providers typically generated by the login provider. This can be used to uniquely identify the user at any time.
birthday date The authenticated user's birthdate.
gender string The gender of the authenticated user.
timezone string The current timezone of the authenticated user as sent by the login provider. The value may be an offset or the timezone spelled out.
locale string Defines the authenticated user's language, country and any special variant.
phoneNumber string The primary phone number for the authenticated user.
region string The state or region of the authenticated user's address
locality string The city or locality of the authenticated user's address
streetAddress string The full street address of the authenticated user.
postalCode string The authenticated user's zip code or postal code.
aboutMe string A biography or description of the authenticated user as typically described by themselves in their profile at the login provider.
email string The primary email address of the authenticated user.
domain* string The top-most authoritative domain for this account, i.e. facebook.com
userid* string A user ID number, usually chosen automatically, and usually numeric but sometimes alphanumeric, e.g. "12345" or "1Z425A".
accessToken string Encrypted, signed, string used to send secure authorized requests to Stitchz for available user resources.
refreshToken string Encrypted, signed, string used to obtain a new access token, without having the end user approve the access again.
accessTokenExpirationUtc date The exact time the access token becomes invalid or expires.
accessTokenIssueDateUtc date The time when the acess token was issued.
 
Check with the Social Login Identity Providers page to see what fields are returned with each social login provider.
 
* Always returned in the response.
 
**Stitchz follows the Portable Contacts version 1.0 draft spec C. The response packet may adjust over time to reflect changes in the Portable Contacts spec and keep the content well organized and logical.
 
Example XML Response
Example JSON Response
<?xml version="1.0" encoding="utf-8"?>
<response status="ok" version="1">
    <profile>
        <id>000000000000000000000</id>
        <displayName>Stitchz Communications</displayName>
        <preferredUsername>[email protected]</preferredUsername>
        <givenName>Stitchz</givenName>
        <familyName>Communications</familyName>
        <url>https://profiles.google.com/000000000000000000000</url>
        <identifier>https://profiles.google.com/000000000000000000000</identifier>
        <email>[email protected]</email>
        <accesstoken>asdfasTRfdasdffSXr1CFeTDOutUPC2VQzdZKN9B1qsfae33adfegg</accesstoken>
        <refreshtoken>GFHSSDFGSDFGTUQv3odV889UOEfD6dsfgsdRTSFVIQs0</refreshtoken>
        <accesstokenexpirationutc>2013/04/25 03:36:40.858</accesstokenexpirationutc>
        <accesstokenissuedateutc>2013/04/25 02:36:40.858</accesstokenissuedateutc>
        <accounts>
            <domain>google.com</domain>
            <userid>000000000000000000000</userid>
        </accounts>
    </profile>
</response>
{"response":
    {"@status": "ok",
     "@version": "1",
     "profile":
        {"id": "000000000000000000000",
        "displayName": "Stitchz Communications",
        "preferredUsername": "stitchz.Communications",
        "image": "https://graph.facebook.com/stitchz/picture",
        "givenName": "Stitchz",
        "familyName": "Communications",
        "gender": "male",
        "url": "http://www.facebook.com/stitchz",
        "identifier": "http://www.facebook.com/stitchz",
        "locale": "en_US",
        "timezone": "-5",
        "accesstoken": "asdfasTRfdasdffSXr1CFeTDOutUPC2VQzdZKN9B1qsfae33adfegg",
        "refreshtoken": "GFHSSDFGSDFGTUQv3odV889UOEfD6dsfgsdRTSFVIQs0",
        "accesstokenexpirationutc": "2013/04/25 03:36:40.858",
        "accesstokenissuedateutc": "2013/04/25 02:36:40.858",
        "accounts": {
            "domain": "facebook.com",
            "userid": "000000000000000000000"
            }
        }
    }
}