# Register Client

`POST /oauth2/register`

Register a new OAuth 2.0 client

## Response Body

```typescript
interface ResponseBody {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  client_id?: string;
  client_secret?: string;
  registration_access_token?: string;
  registration_client_uri?: string;
  client_id_issued_at?: number;
  client_secret_expires_at?: number;
  client_name?: string;
  redirect_uris?: string[];
  grant_types?: string[];
  response_types?: string[];
  token_endpoint_auth_method?: string;
  client_uri?: string;
  logo_uri?: string;
  scope?: string;
  contacts?: string[];
  tos_uri?: string;
  policy_uri?: string;
  jwks_uri?: string;
  software_id?: string;
  software_version?: string;
  application_type?: string;
  sector_identifier_uri?: string;
  subject_type?: string;
  id_token_signed_response_alg?: string;
  userinfo_signed_response_alg?: string;
  request_object_signing_alg?: string;
  description?: string;
  token_expires_in?: number;
}
```

## Response Example

**Status:** `201 Created`

```json
{
  "client_id": "123-api-buddy-client",
  "client_secret": "cf136dc3c697097915ed7f4a70d1f1a",
  "registration_access_token": "this.is.a.registration.access.token",
  "registration_client_uri": "https://api.buddy.works/oauth2/register/123-api-buddy-client",
  "client_id_issued_at": 1675123456,
  "client_secret_expires_at": 0,
  "client_name": "My Application",
  "redirect_uris": [
    "https://client.example.org/callback"
  ],
  "grant_types": [
    "authorization_code",
    "refresh_token",
    "client_credentials"
  ],
  "response_types": [
    "code"
  ],
  "token_endpoint_auth_method": "client_secret_basic",
  "client_uri": "https://client.example.org",
  "description": "My OAuth 2.0 application",
  "token_expires_in": 3600
}
```

---
Original source: https://buddy.works/docs/api/oauth/register