Facebook Sign In

​

Authenticates a user using a Facebook access token (from Facebook SDK / Login). The token is validated via Facebook Graph API debug_token; it must be valid and issued for the configured Facebook app (app_id match). On success, returns token envelope; downstream may create/update user and issue tokens.

Token Lifetime and Expiry Details:

  • Access Token Validity (data.access_token): 5–60 minutes (default: 5 minutes). The response includes the data.expires_in attribute indicating token lifetime in seconds. Contact your Punchh representative to update this Punchh platform configuration.
  • Refresh Token Validity (data.refresh_token): 1–30 days (default: 1 day). Contact your Punchh representative to update this Punchh platform configuration.

Headers

  • Optional caller-provided correlation ID; echoed in responses when present.

Body

required
application/json
  • Facebook user access token from Facebook SDK / Login flow.

  • OAuth client ID provided by the business. Required to identify the client application for authentication. The OAuth application must have the Advance Auth scope enabled.

  • Must be true to allow signup.

  • Must be true to allow signup.

  • Signup channel identifier (optional, defaults to WebFacebook).

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api2/social/facebook/signin
curl https://SERVER_NAME_GOES_HERE/api2/social/facebook/signin \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "client": "CLIENT_GOES_HERE",
  "access_token": "ACCESS_TOKEN_GOES_HERE",
  "signup_channel": "WebFacebook",
  "privacy_policy": true,
  "terms_and_conditions": true
}'
{
  "data": {
    "access_token": "ACCESS_TOKEN_GOES_HERE",
    "token_type": "Bearer",
    "refresh_token": "REFRESH_TOKEN_GOES_HERE",
    "expires_in": 3600
  }
}