---
title: "Register a new account via Discord OAuth"
method: POST
path: "/v1/auth/social/discord/register"
tags: ["claim"]
---

# Register a new account via Discord OAuth

`POST /v1/auth/social/discord/register`

## Request

- Base URL: `https://api.grove.city` (the document declares no server; this is the origin it was published from)
- URL: `https://api.grove.city/v1/auth/social/discord/register`
- Auth: none declared

Create a new Grove account by proving Discord ownership + providing
an email and handle.

**Intended flow:**
1. Call ``POST /v1/auth/social/discord`` first
2. If 404 (no existing account), call this endpoint with the same OAuth token
   plus the user's email and desired handle

The OAuth token proves social identity ownership — no separate OTP is needed.
The email becomes the account's primary identity. The Discord
identity is attached and marked verified.

Rate-limited per client IP.

## Request body

- DiscordSocialRegisterRequest: Request model for ``POST /v1/auth/social/discord/register``.
  - `access_token` string, required: Platform OAuth access token obtained client-side
  - `email` string, required: User's email address (required for account creation)
  - `handle` string, required: Desired Grove handle (case-insensitive, alphanumeric + underscores)

## Response `200`

Successful Response

- LoginCompleteResponse: Response model for login complete.
  - `account_id` string, required: Account ID
  - `api_key` string, required: Grove API key (JWT)
  - `identity_type` string, required: Primary identity type
  - `identity_value` string, required: Primary identity value
  - `tipping_address` string, required: Server wallet address (for tipping)
  - `onchain_address` string, required

## Other responses

- `400`: Invalid or expired OAuth access token
- `409`: Email, social identity, or handle already in use
- `422`: Invalid handle format or missing fields
- `429`: Rate limit exceeded for this client IP
- `500`: Failed to provision account or wallet

---

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