Log in With Google
This API enables users to log in using Google Sign-in on the Web.
The following must be configured for the business in the Punchh platform to make a successful call to the API:
- Google sign-in must be enabled.
- Google web client ID, Google iOS client ID / Google Andriod client ID, and Google web client secret must be specified.
Contact your Punchh representative to update these configurations.
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringUser
- Agent requiredFor details, see User Agent.
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringAccept
- Language Set to the language you are using.
- Type: stringclientrequired
Client key of the business
- Type: stringgoogle
_id _token requiredToken received from Google
- Type: stringaddress
Address of the user
- Type: booleanage
_verified Whether the age of the user has been verified or not. Required when the business-level age verification is enabled.
- Type: booleanage
_verified _status Whether or not the user has undergone age verification by Koupon Media. Possible values: true, false. The parameter is accepted in the request if Koupon Media is selected as the age verification adapter for the business in the Punchh platform. Contact your Punchh representative to update this configuration.
- enumanniversaryconst:YYYY-MM-DD
Anniversary date of the user
values- Y
Y Y Y - M M - D D
- Type: stringbirthday
Date of birth of the user, in YYYY-MM-DD format
- Type: stringcity
City where the user lives
- Type: stringfavourite
_location _ids Favorite location IDs of the user
- Type: stringfirst
_name First name of the user
- Type: stringgender
Gender of the user
- Type: stringlast
_name Last name of the user
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/users/connect_with_google \
--request POST \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'User-Agent: Punchh/OnlineOrder/1.0/Web/BrowserVersion/OS_Type' \
--header 'x-pch-digest: SIGNATURE_GOES_HERE' \
--header 'Accept-Language: en' \
--data '{
"client": "CLIENT_KEY_GOES_HERE",
"google_id_token": "GOOGLE_ID_TOKEN_GOES_HERE",
"first_name": "FIRST_NAME_GOES_HERE",
"last_name": "LAST_NAME_GOES_HERE",
"privacy_policy": true,
"age_verified": false,
"phone": 1111111111,
"birthday": "1999-01-01",
"favourite_location_ids": "304155",
"secondary_email": "test@example.com",
"marketing_email_subscription": true,
"marketing_pn_subscription": true,
"anniversary": "2013-07-13",
"zip_code": "30201",
"address": "ADDRESS_GOES_HERE",
"city": "Mountain View",
"state": "California",
"gender": "female",
"send_compliance_sms": true,
"terms_and_conditions": true,
"age_verified_status": true
}'
{
"address_line1": "ADDRESS_GOES_HERE",
"anniversary": null,
"avatar_remote_url": null,
"birthday": "1999-01-01",
"city": "Mountain View",
"created_at": "2023-05-24T13:25:23Z",
"email": "test@example.com",
"email_verified": false,
"fb_uid": null,
"first_name": "FIRST_NAME_GOES_HERE",
"age_verified": false,
"privacy_policy": false,
"gender": "female",
"id": 94731770,
"last_name": "LAST_NAME_GOES_HERE",
"state": "California",
"updated_at": "2023-05-25T06:29:55Z",
"zip_code": "45672",
"test_user": false,
"allow_multiple": false,
"authentication_token": "AUTHENTICATION_TOKEN_GOES_HERE",
"auth_token": {
"token": "ACCESS_TOKEN_GOES_HERE",
"seconds_to_expire": null,
"revoked_at": null,
"refresh_token": "REFRESH_TOKEN_GOES_HERE",
"scopes": [
"wifi"
]
},
"favourite_locations": "",
"favourite_store_numbers": "1023",
"marketing_email_subscription": false,
"marketing_pn_subscription": false,
"passcode_configured": false,
"profile_field_answers": {},
"referral_code": "REFERRAL_CODE_GOES_HERE",
"referral_path": "URL_GOES_HERE",
"secondary_email": "test@example.com",
"terms_and_conditions": false,
"title": null,
"user_as_barcode": "11111111",
"user_as_qrcode": "QR_CODE_GOES_HERE",
"user_code": "P11111111",
"user_id": 94731770,
"user_relations": [],
"work_zip_code": null,
"preferred_locale": "en",
"force_password_reset": null,
"expiration_date": null,
"sms_subscription": false,
"phone": "1111111111",
"migrate_status": false,
"email_unsubscribe": true,
"allow_push_notifications": false,
"facebook_signup": false,
"communicable_email": "test@example.com",
"access_token": "ACCESS_TOKEN_GOES_HERE",
"verification_mode": null,
"apple_signup": false,
"apple_uid": null,
"age_verified_status": true
}