Create SSO Access Token
Generates authentication token using the security token.
Headers
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringUser
- Agent requiredFor details, see User Agent.
Body
application/json
- Type: stringclientrequired
Client key of the business
- Type: stringsecurity
_token requiredSecurity token required to generate the authentication token. For more information on generating the security token, see Mobile SSO Flow.
Responses
- application/json
- 400
- application/json
Request Example for post/api/auth/sso
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/sso \
--request POST \
--header 'x-pch-digest: SIGNATURE_GOES_HERE' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'User-Agent: Punchh/OnlineOrder/1.0/Web/BrowserVersion/OS_Type' \
--data '{
"client": "CLIENT_GOES_HERE",
"security_token": "SECURITY_TOKEN_GOES_HERE"
}'
{
"token": {
"access_token": "ACCESS_TOKEN_GOES_HERE"
},
"user": {
"anniversary": null,
"avatar_remote_url": null,
"birthday": null,
"created_at": "2015-08-18T13:53:06Z",
"email": "test@example.com",
"fb_uid": "FB_UID_GOES_HERE",
"first_name": "FIRST_NAME_GOES_HERE",
"gender": null,
"id": 111111111,
"last_name": "LAST_NAME_GOES_HERE",
"updated_at": "2015-08-18T13:53:06Z",
"allow_multiple": false,
"authentication_token": "AUTHENTICATION_TOKEN_GOES_HERE",
"favourite_locations": "",
"preferred_menu_items": [],
"referral_code": "REFERRAL_CODE_GOES_HERE",
"referral_path": "URL_GOES_HERE",
"secondary_email": null,
"user_as_barcode": "1111111",
"user_as_qrcode": "QR_CODE_GOES_HERE",
"user_relations": [],
"wants_menu_notifications": false,
"profile_field_answers": {},
"address_line1": null,
"zip_code": null,
"phone": null,
"migrate_status": false,
"work_zip_code": null,
"email_unsubscribe": null,
"allow_push_notifications": true,
"facebook_signup": false,
"communicable_email": "test@example.com",
"access_token": null
}
}