---
title: "Exchange an redirect Apple auth code for a session token"
method: POST
path: "/compat/v2/users/signInWithRedirectApple"
tags: ["users"]
---

# Exchange an redirect Apple auth code for a session token

`POST /compat/v2/users/signInWithRedirectApple`

## Request

- Base URL: `https://api.recipesage.com`
- URL: `https://api.recipesage.com/compat/v2/users/signInWithRedirectApple`
- Auth: none required
- TypeScript: <https://skmtc.dev/recipesage/apis/recipesage-api/docs/compat/v2/users/signInWithRedirectApple/post.ts> (a function with typed inputs; its response is checked against the schema)

Requires no session token. Requires the PKCE code verifier that matches the challenge bound to the auth code. Responds 401 if the supplied auth code has an invalid signature, has expired, or the verifier does not match.

## Request body

- object
  - `code` string, required
  - `codeVerifier` string, required

## Response `200`

Successful response

- object
  - `token` string, required
  - `userId` string, uuid, required
  - `email` string, required
  - `isNewUser` boolean

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `500`: Internal server error

## Changes

- **2026-09-11** `b5c4dea336e7`: 1 info
  - added the optional property `isNewUser` to the response with the `200` status
- **2026-09-10** `e6ac47572e64`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/recipesage/apis/recipesage-api/changes/compat/v2/users/signInWithRedirectApple/post.md)

---

[API](https://skmtc.dev/recipesage/apis/recipesage-api.md) - [All operations](https://skmtc.dev/recipesage/apis/recipesage-api/llms.txt) - [OpenAPI document](https://skmtc.dev/recipesage/apis/recipesage-api/revisions/48bb065aef70?raw)
