> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://developers.awork.com/apiv1/client-applications/post-client-applications-register/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.awork.com/_mcp/server. # Dynamically registers a new OAuth 2.0 client according to RFC 7591. POST https://api.awork.com/api/v1/clientapplications/register Content-Type: application/json Allows unauthenticated access. Reference: https://developers.awork.com/apiv1/client-applications/post-client-applications-register ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Body (application/json) This endpoint expects a DynamicClientRegistrationEndpointRequest. - `redirect_uris` (list of string, optional, nullable) - `client_name` (string, optional, nullable) - `token_endpoint_auth_method` (string, optional, nullable) - `grant_types` (list of string, optional, nullable) - `response_types` (list of string, optional, nullable) - `scope` (string, optional, nullable) - `application_type` (string, optional, nullable) - `contacts` (list of string, optional, nullable) - `logo_uri` (string, optional, nullable) - `client_uri` (string, optional, nullable) - `policy_uri` (string, optional, nullable) - `tos_uri` (string, optional, nullable) - `software_id` (string, optional, nullable) - `software_version` (string, optional, nullable) ## Response ### 201 Created - `redirect_uris` (list of string, optional, nullable) — Array of redirection URI strings for use in redirect-based flows. - `client_name` (string, optional, nullable) — Human-readable name of the client to be presented to the end-user. - `token_endpoint_auth_method` (string, optional, nullable) — Requested authentication method for the token endpoint. - `grant_types` (list of string, optional, nullable) — Array of OAuth 2.0 grant types that the client will use. - `response_types` (list of string, optional, nullable) — Array of OAuth 2.0 response types that the client will use. - `scope` (string, optional, nullable) — Space-delimited list of OAuth 2.0 scope values. - `application_type` (string, optional, nullable) — Kind of the application. - `contacts` (list of string, optional, nullable) — Array of e-mail addresses of people responsible for this client. - `logo_uri` (string, optional, nullable) — URL that references a logo for the client application. - `client_uri` (string, optional, nullable) — URL of the home page of the client application. - `policy_uri` (string, optional, nullable) — URL that the client provides to the end-user with information about how the client uses their data. - `tos_uri` (string, optional, nullable) — URL that the client provides to the end-user to read about the client's terms of service. - `software_id` (string, optional, nullable) — A unique identifier string (e.g., a Universally Unique Identifier (UUID)) assigned by the client developer. - `software_version` (string, optional, nullable) — A version identifier string for the client software identified by software_id. - `client_id` (string, optional, nullable) — OAuth 2.0 client identifier string. - `client_secret` (string, optional, nullable) — OAuth 2.0 client secret string. Only provided for confidential clients. - `client_secret_expires_at` (long, optional) — Time at which the client secret will expire (0 if it doesn't expire). - `client_id_issued_at` (long, optional) — Time at which the client identifier was issued as seconds since Unix epoch. ## Errors ### 400 Bad Request Error Bad Request - `code` (string, required) — The error code. - `description` (string, required) — The description of the error. - `link` (string, required) — The link to the API documentation page. - `details` (list of string, optional, nullable) — A list of details describing the error. - `validationErrors` (list of ValidationErrorResponse, optional, nullable) — If a validation error occurred, this contains the validation errors for each property. - `traceId` (string, optional, nullable) — The request trace id for tracking the request. ## Types ### ValidationErrorResponse The validation error response. - `property` (string, optional, nullable) — The name of the property that failed validation. - `message` (string, optional, nullable) — The reason why this property failed validation. ## Examples **Request** ```json {} ``` **Response** ```json { "redirect_uris": [ "https://app.ncnstn.com/oauth/callback", "https://app.ncnstn.com/oauth/callback-2" ], "client_name": "NCNSTN Integration", "token_endpoint_auth_method": "client_secret_basic", "grant_types": [ "authorization_code", "refresh_token" ], "response_types": [ "code" ], "scope": "openid profile email offline_access", "application_type": "web", "contacts": [ "carla@ncnstn.com", "dev@ncnstn.com" ], "logo_uri": "https://app.ncnstn.com/logo.png", "client_uri": "https://app.ncnstn.com", "policy_uri": "https://app.ncnstn.com/privacy", "tos_uri": "https://app.ncnstn.com/terms", "software_id": "a3f8c3a1-6f1b-4ac7-8cb3-9d4c2b2b8f9f", "software_version": "1.0.0", "client_id": "dcr_ncnstn_integration_123456", "client_secret": "G7g9jK8mP2nR4sT6vY8xZ0wQ", "client_secret_expires_at": 0, "client_id_issued_at": 1617187200 } ``` **SDK Code** ```python import requests url = "https://api.awork.com/api/v1/clientapplications/register" payload = {} headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.awork.com/api/v1/clientapplications/register'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{}' }; 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://api.awork.com/api/v1/clientapplications/register" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") 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://api.awork.com/api/v1/clientapplications/register") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.awork.com/api/v1/clientapplications/register") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('POST', 'https://api.awork.com/api/v1/clientapplications/register', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.awork.com/api/v1/clientapplications/register"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.awork.com/api/v1/clientapplications/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() ```