---
title: "Generate Authorization Code for Customer User"
method: POST
path: "/authenticate/partner/request-customer-authcode"
tags: ["Magic Links"]
---

# Generate Authorization Code for Customer User

`POST /authenticate/partner/request-customer-authcode`

Generates an authorization code for a customer user using a platform JWT token.

This endpoint extracts the platform user ID directly from the JWT token's claims
(details.id field) and generates a short-lived auth code.

Unlike /authenticate/partner/request-authcode, this endpoint:
- Does NOT require a customerUserId in the request body
- Accepts only platform JWT tokens (not client auth tokens)
- Extracts platformUserId from the JWT token's "details.id" claim

**Security considerations:**
- Requires valid Bearer token (platform JWT) in Authorization header
- Auth code is short-lived (typically 60 seconds)
- Auth code can only be used once

**Authentication:**
- Requires Bearer token (platform JWT) in Authorization header

## Headers

- `Authorization` object, required

## Response `200`

Auth code generated successfully

- UserServiceInlineResponse2001
  - `auth_code` string, required — The generated authorization code
  - `expires_in` integer, required — Auth code expiration time in seconds
  - `customer_user_id` string — The customer user ID (UUID). Included when a user was auto-provisioned.

## Other responses

- `400` — Bad Request - Validation failed
- `401` — Invalid or missing authorization token
- `500` — Internal Server Error - Unexpected server error

---

[API](https://skmtc.net/usemultiplier/apis/multiplier-public-rest-api.md) · [All operations](https://skmtc.net/usemultiplier/apis/multiplier-public-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usemultiplier/multiplier-public-rest-api/revisions/59cd6443fdbf/schema)
