> This page is for MVS Auth.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mvscloud.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mvscloud.com/_mcp/server.

# Post Oauth 2 Register

POST https://c-auth.mvscloud.com/api/auth/oauth2/register
Content-Type: application/json

**Not the supported registration path.** Dynamic client registration is gated (`allowDynamicClientRegistration: false`); unauthenticated calls are rejected. Register clients via `POST /api/auth/admin/oauth-clients` (admin session or Initial Access Token) — see the self-service registration guide.

Register an OAuth2 application

Reference: https://docs.mvscloud.com/mvs-auth/central-auth-api/oauth-provider/post-oauth-2-register

## Authentication

- `Authorization` header (bearer token, required) — Bearer token authentication

## Request

### Body (application/json)

This endpoint expects an object.

- `redirect_uris` (list of any, required)
- `scope` (string, optional, nullable)
- `client_name` (string, optional, nullable)
- `client_uri` (string, optional, nullable)
- `logo_uri` (string, optional, nullable)
- `contacts` (list of any, optional, nullable)
- `tos_uri` (string, optional, nullable)
- `policy_uri` (string, optional, nullable)
- `software_id` (string, optional, nullable)
- `software_version` (string, optional, nullable)
- `software_statement` (string, optional, nullable)
- `post_logout_redirect_uris` (list of any, optional, nullable)
- `backchannel_logout_uri` (string, optional, nullable)
- `backchannel_logout_session_required` (boolean, optional, nullable)
- `token_endpoint_auth_method` (string, optional, nullable, default: client_secret_basic)
- `jwks` (string, optional, nullable)
- `jwks_uri` (string, optional, nullable)
- `grant_types` (list of any, optional, nullable, default: ["authorization_code"])
- `response_types` (list of any, optional, nullable, default: ["code"])
- `type` (string, optional, nullable)
- `subject_type` (string, optional, nullable)
- `skip_consent` (string, optional, nullable)

## Response

### 200

OAuth2 application registered successfully

- `client_id` (string, required) — Unique identifier for the client
- `client_secret` (string, optional) — Secret key for the client
- `client_secret_expires_at` (double, optional) — Time the client secret will expire. If 0, the client secret will never expire.
- `scope` (string, optional) — Space-separated scopes allowed by the client
- `user_id` (string, optional) — ID of the user who registered the client, null if registered anonymously
- `client_id_issued_at` (double, optional) — Creation timestamp of this client
- `client_name` (string, optional) — Name of the OAuth2 application
- `client_uri` (string, optional) — Name of the OAuth2 application
- `logo_uri` (string, optional) — Icon URL for the application
- `contacts` (list of string, optional) — List representing ways to contact people responsible for this client, typically email addresses
- `tos_uri` (string, optional) — Client's terms of service uri
- `policy_uri` (string, optional) — Client's policy uri
- `software_id` (string, optional) — Unique identifier assigned by the developer to help in the dynamic registration process
- `software_version` (string, optional) — Version identifier for the software_id
- `software_statement` (string, optional) — JWT containing metadata values about the client software as claims
- `redirect_uris` (list of string, optional) — List of allowed redirect uris
- `post_logout_redirect_uris` (list of string, optional) — List of allowed logout redirect uris
- `backchannel_logout_uri` (string, optional) — RP URL to receive signed Logout Tokens when the end-user's OP session terminates
- `backchannel_logout_session_required` (boolean, optional) — Whether the RP requires a `sid` claim in every Logout Token
- `token_endpoint_auth_method` (enum, optional) — Requested authentication method for the token endpoint
  - Allowed values: `none`, `client_secret_basic`, `client_secret_post`, `private_key_jwt`
- `grant_types` (list of enum, optional) — Requested authentication method for the token endpoint
  - Allowed values: `authorization_code`, `client_credentials`, `refresh_token`
- `response_types` (list of enum, optional) — Requested authentication method for the token endpoint
  - Allowed values: `code`
- `public` (boolean, optional) — Whether the client is public as determined by the type
- `type` (enum, optional) — Type of the client
  - Allowed values: `web`, `native`, `user-agent-based`
- `disabled` (boolean, optional) — Whether the client is disabled

## Errors

### 400 Bad Request Error

Bad Request. Usually due to missing parameters, or invalid parameters.

- `message` (string, required)

### 401 Unauthorized Error

Unauthorized. Due to missing or invalid authentication.

- `message` (string, required)

### 403 Forbidden Error

Forbidden. You do not have permission to access this resource or to perform this action.

- `message` (string, optional)

### 404 Not Found Error

Not Found. The requested resource was not found.

- `message` (string, optional)

### 429 Too Many Requests Error

Too Many Requests. You have exceeded the rate limit. Try again later.

- `message` (string, optional)

### 500 Internal Server Error

Internal Server Error. This is a problem with the server that you cannot fix.

- `message` (string, optional)

## Examples

**Request**

```json
{
  "redirect_uris": [
    "string"
  ]
}
```

**Response**

```json
{
  "client_id": "string",
  "client_secret": "string",
  "client_secret_expires_at": 1.1,
  "scope": "string",
  "user_id": "string",
  "client_id_issued_at": 1.1,
  "client_name": "string",
  "client_uri": "string",
  "logo_uri": "string",
  "contacts": [
    "string"
  ],
  "tos_uri": "string",
  "policy_uri": "string",
  "software_id": "string",
  "software_version": "string",
  "software_statement": "string",
  "redirect_uris": [
    "string"
  ],
  "post_logout_redirect_uris": [
    "string"
  ],
  "backchannel_logout_uri": "string",
  "backchannel_logout_session_required": true,
  "token_endpoint_auth_method": "none",
  "grant_types": [
    "authorization_code"
  ],
  "response_types": [
    "code"
  ],
  "public": true,
  "type": "web",
  "disabled": true
}
```

**SDK Code**

```python
import requests

url = "https://c-auth.mvscloud.com/api/auth/oauth2/register"

payload = { "redirect_uris": ["string"] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://c-auth.mvscloud.com/api/auth/oauth2/register';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"redirect_uris":["string"]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://c-auth.mvscloud.com/api/auth/oauth2/register"

	payload := strings.NewReader("{\n  \"redirect_uris\": [\n    \"string\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://c-auth.mvscloud.com/api/auth/oauth2/register")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"redirect_uris\": [\n    \"string\"\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://c-auth.mvscloud.com/api/auth/oauth2/register")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"redirect_uris\": [\n    \"string\"\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://c-auth.mvscloud.com/api/auth/oauth2/register', [
  'body' => '{
  "redirect_uris": [
    "string"
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://c-auth.mvscloud.com/api/auth/oauth2/register");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"redirect_uris\": [\n    \"string\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["redirect_uris": ["string"]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://c-auth.mvscloud.com/api/auth/oauth2/register")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```