Layerbeat

Start social sign-in or connect a provider

POST
/v1/auth/social/{provider}/start

Starts Google or GitHub sign-in, or connects a provider to your existing account.

Access: Layerbeat browser. Linking requires a user session and a sign-in within the last 15 minutes.

Path Parameters

provider*string

The fixed supported identity provider.

Value in"google""github"

Header Parameters

Origin*string

Exact configured Layerbeat browser origin.

Formaturi

Request Body

application/json
  1. body
action*string
Value in"signin""link"
onboarding?boolean

Default false. Binds deferred setup to a new signup through this protected flow. Cannot be combined with organization, billing or referral fields, or action link. Existing accounts keep their settings and completed setup.

org_name?string

Only for a new social signup.

Lengthlength <= 100
billing_currency?string

Only for a new social signup. Browser-bound to the original flow; existing account login never changes preferences. Forbidden with action link.

Value in"USD""IDR"
referral_code?string

Optional eight-character code, case-insensitive; legacy codes remain accepted. A valid first-touch cookie takes precedence.

Lengthlength <= 30

Response Body

An authorization URL and browser-bound ten-minute flow. The raw verifier is only in an HttpOnly cookie.

application/json
  1. response
authorization_url*string
Formaturi
expires_at*string
Formatdate-time
curl -X POST 'https://layerbeat.com/v1/auth/social/google/start' \  -H 'Origin: https://app.layerbeat.com' \  -H 'Content-Type: application/json' \  -d '{  "action": "signin"}'
{  "authorization_url": "https://accounts.google.com/o/oauth2/v2/auth?client_id=public-client-id&response_type=code&state=example-state&code_challenge_method=S256",  "expires_at": "2026-10-04T01:10:00Z"}