Authentication

Social Auth

Exchange a social provider token for an API token. Supports Google, Apple, and Facebook.

post/api/v1/auth/social/{provider}

Request

  • Base URL: https://www.endlesstravelplans.com
  • URL: https://www.endlesstravelplans.com/api/v1/auth/social/{provider}
  • Auth: none required

Request body

tokenstring required

The access token (Google/Facebook) or identity token (Apple).

authorization_codestring

optional Apple authorization code from the native sign-in; lets the server revoke the sign-in when the account is deleted.

partner_codestring nullable

Must not be greater than 32 characters.

Example request

{
  "token": "ya29.a0AfH6SM...",
  "authorization_code": "architecto",
  "partner_code": "n"
}

Response

OR

Example response

{
  "user": {
    "id": 42,
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@example.com",
    "phone": null,
    "bio": null,
    "preferred_language": null,
    "timezone": "America/New_York",
    "profile_photo_url": null,
    "has_pro_access": false,
    "subscription_plan": "free",
    "can_create_trip": true,
    "max_saved_trips": 1,
    "is_anonymous": false,
    "marketing_consent": true,
    "marketing_consent_source": "api:notice-us",
    "created_at": "2026-10-13T09:00:00+00:00"
  },
  "token": "eyJ0eXAi...",
  "expires_in": 31536000,
  "expires_at": "2027-10-13T09:00:00Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.