SpendRock Docs
Auth

Finish the mobile app's Google login (AUTH-1)

The app logs in with Google in a system browser sheet: it opens `/signin/google?app_redirect=<its URL>&code_challenge=<S256 challenge>`, the web flow runs, and the browser returns to the app with a one-time `code` (valid 2 minutes). The app redeems it here with its PKCE `code_verifier` (RFC 7636) for a bearer session token. 401 `unauthenticated` if the code is wrong, used, or expired, or the verifier doesn't match. No authentication needed.

POST
/auth/app/exchange

The app logs in with Google in a system browser sheet: it opens /signin/google?app_redirect=<its URL>&code_challenge=<S256 challenge>, the web flow runs, and the browser returns to the app with a one-time code (valid 2 minutes). The app redeems it here with its PKCE code_verifier (RFC 7636) for a bearer session token. 401 unauthenticated if the code is wrong, used, or expired, or the verifier doesn't match.

No authentication needed.

Header Parameters

SpendRock-Version?string

The API version (DEV-5), YYYY-MM-DD. Without it: your personal access token's pinned version, or the latest. 400 unknown_version / version_retired.

Match^\d{4}-\d{2}-\d{2}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/auth/app/exchange" \  -H "Content-Type: application/json" \  -d '{    "code": "string",    "code_verifier": "stringstringstringstringstringstringstrings"  }'
{  "token": "string",  "me": {    "user": {      "id": "string",      "email": "string",      "name": "string",      "avatar_url": "string"    },    "default_household_id": "01J8Z3N4Q5R6S7T8V9W0X1Y2Z3",    "households": [      {        "id": "01J8Z3N4Q5R6S7T8V9W0X1Y2Z3",        "name": "string",        "role": "owner",        "personal": true,        "default": true,        "archived": true,        "member_count": 0,        "joined_at": "2019-08-24T14:15:22Z"      }    ],    "deactivated": true  }}