Log in With Facebook
This API is invoked when a user registers on a business app using Facebook ID, email address, first name, last name, etc. On success, the API returns the user's profile details.
- 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: stringAccept
- Language Set to the language you are using.
- Type: stringUser
- Agent requiredFor details, see User Agent.
- Type: stringaccess
_token requiredAccess token provided by Facebook
- Type: stringclientrequired
Client key of the business
- Type: stringemailrequired
Email address of the user for sign-up
- Type: stringaddress
_line1 Address information (part 1) of the user
- Type: stringaddress
_line2 Address information (part 2) of the user
- Type: booleanage
_verified _status Whether or not the user has undergone age verification. Possible Values: true, false. The value is set to true if the user's age is verified; otherwise, it is set to false. The response returns this parameter in sign-in, sign-up, and user update APIs if the age verification is enabled for the business in the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration setting.
- Type: stringanniversary
Anniversary of the user
- Type: stringapn
_token Apple Push Notification (APN) token
- Type: booleanapn
_token _readability Whether Apple Push Notification (APN) is enabled on the iOS mobile app or not
- Type: stringapp
_device _id Device ID of the mobile app
- Format: dateenumbirthdayconst:YYYY-MM-DD
Birthday of the user
values- Y
Y Y Y - M M - D D
- Type: stringcell
_phone Cell phone number of the user
- application/json
- 412
Sending invalid Signature
- 422
Sending invalid Entity
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/users/connect_with_facebook \
--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 '{
"access_token": "ACCESS_TOKEN_GOES_HERE",
"address_line_1": "ADDRESS_GOES_HERE",
"anniversary": "2015-05-17",
"apn_token": "APN_TOKEN_GOES_HERE",
"app_device_id": "APP_DEVICE_ID_GOES_HERE",
"birthday": "1990-05-17",
"cell_phone": "+1-111-111-1111",
"client": "CLIENT_GOES_HERE",
"country": "USA",
"email": "test@example.com",
"fav_location_id": 30245,
"fb_uid": "FB_UID_GOES_HERE",
"first_name": "FIRST_NAME_GOES_HERE",
"gcm_token": "GCM_TOKEN_GOES_HERE",
"gender": "male",
"invite_code": "DianeM97",
"last_name": "LAST_NAME_GOES_HERE",
"password": "PASSWORD_GOES_HERE",
"password_confirmation": "PASSWORD_GOES_HERE",
"secondary_email": "test@example.com",
"state": "Ohio",
"unsubscribed": false,
"user_relations": [
{
"id": 229,
"name": "FIRST_NAME_GOES_HERE LAST_NAME_GOES_HERE",
"relation": "kid",
"birthday": "2013-12-31"
},
{
"id": 230,
"name": "FIRST_NAME_GOES_HERE LAST_NAME_GOES_HERE",
"relation": "spouse",
"birthday": "1992-12-31"
}
],
"work_zip_code": "1234556",
"zip_code": "70001",
"age_verified_status": true
}'
{
"access_token": "ACCESS_TOKEN_GOES_HERE",
"address_line1": "ADDRESS_GOES_HERE",
"allow_multiple": false,
"allow_push_notifications": true,
"anniversary": "2015-05-17",
"authentication_token": "AUTHENTICATION_TOKEN_GOES_HERE",
"avatar_remote_url": null,
"birthday": "1990-05-17",
"communicable_email": "test@example.com",
"created_at": "2015-12-08T10:57:35Z",
"email": "test@example.com",
"email_unsubscribe": null,
"email_verified": false,
"facebook_signup": false,
"favourite_locations": "30245",
"favourite_store_numbers": "1023",
"fb_uid": null,
"first_name": "FIRST_NAME_GOES_HERE",
"gender": "male",
"id": 111111111,
"last_name": "LAST_NAME_GOES_HERE",
"marketing_email_subscription": false,
"marketing_pn_subscription": false,
"migrate_status": false,
"passcode_configured": false,
"phone": 1111111111,
"preferred_menu_items": [],
"profile_field_answers": {},
"referral_code": "REFERRAL_CODE_GOES_HERE",
"referral_path": "URL_GOES_HERE",
"secondary_email": "test@example.com",
"terms_and_conditions": false,
"title": "",
"updated_at": "2016-01-07T09:24:27Z",
"user_as_barcode": "1111111",
"user_as_qrcode": "QR_CODE_GOES_HERE",
"user_id": 111111111,
"user_relations": [
{
"id": 229,
"name": "FIRST_NAME_GOES_HERE LAST_NAME_GOES_HERE",
"relation": "kid",
"birthday": "2013-12-31"
},
{
"id": 230,
"name": "FIRST_NAME_GOES_HERE LAST_NAME_GOES_HERE",
"relation": "spouse",
"birthday": "1992-12-31"
}
],
"wants_menu_notifications": false,
"work_zip_code": null,
"zip_code": "70001",
"expiration_date": "2018-07-31",
"age_verified_status": true
}