Skip to main content

Get OAuth Status

GET 

/api/temu/oauth/status

Polled by the frontend after the OAuth popup/redirect to learn the state of the OAuth session.

Authorization

Any valid API token can call this endpoint — no specific scope required. Manage tokens.

Used to determine whether Temu has called back yet, and what the next action is (e.g. proceed to /oauth/complete, or show a reconnection success toast).

Query parameters:

  • state (string, required) — The state returned by oauth/initialize.

Response data (always returned with HTTP 200):

  • found (bool) — false when state is missing, expired, or unknown. The remaining fields are omitted in that case (only message is present).
  • completed (bool) — true once /oauth/complete or a reconnection has marked the session as done.
  • has_code (bool) — true once the OAuth callback endpoint has received Temu's redirect and stored the authorization code in cache. The frontend uses this to know it's safe to call /oauth/complete.
  • name (string|null) — The display name the user picked at /oauth/initialize.
  • message (string, only on found: false) — Human-readable reason (missing parameter or expired session).

Authentication: Bearer token (Sanctum).

Request

Responses

OK

Response Headers
    Content-Type