> ## Documentation Index
> Fetch the complete documentation index at: https://help.teable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Put oauthclient

> Update an OAuth application



## OpenAPI

````yaml /swagger.json put /oauth/client/{clientId}
openapi: 3.0.0
info:
  version: 1.0.0
  title: Teable App
  description: Manage Data as easy as drink a cup of tea
  x-logo:
    backgroundColor: '#F0F0F0'
    altText: Teable logo
servers:
  - url: https://app.teable.ai/api
security: []
paths:
  /oauth/client/{clientId}:
    put:
      tags:
        - oauth
      description: Update an OAuth application
      parameters:
        - schema:
            type: string
          required: true
          name: clientId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                clientId:
                  type: string
                name:
                  type: string
                secrets:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      secret:
                        type: string
                      lastUsedTime:
                        type: string
                    required:
                      - id
                      - secret
                scopes:
                  type: array
                  items:
                    type: string
                logo:
                  type: string
                  format: uri
                homepage:
                  type: string
                  format: uri
                redirectUris:
                  type: array
                  items:
                    type: string
                    format: uri
              required:
                - clientId
                - name
                - homepage
                - redirectUris
      responses:
        '200':
          description: Returns the updated OAuth application
          content:
            application/json:
              schema:
                type: object
                properties:
                  clientId:
                    type: string
                  name:
                    type: string
                  secrets:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        secret:
                          type: string
                        lastUsedTime:
                          type: string
                      required:
                        - id
                        - secret
                  scopes:
                    type: array
                    items:
                      type: string
                  logo:
                    type: string
                    format: uri
                  homepage:
                    type: string
                    format: uri
                  redirectUris:
                    type: array
                    items:
                      type: string
                      format: uri
                required:
                  - clientId
                  - name
                  - homepage
                  - redirectUris
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request PUT \
              --url https://app.teable.ai/api/oauth/client/%7BclientId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"clientId":"string","name":"string","secrets":[{"id":"string","secret":"string","lastUsedTime":"string"}],"scopes":["string"],"logo":"http://example.com","homepage":"http://example.com","redirectUris":["http://example.com"]}'
        - lang: JavaScript
          source: |-
            const url = 'https://app.teable.ai/api/oauth/client/%7BclientId%7D';
            const options = {
              method: 'PUT',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"clientId":"string","name":"string","secrets":[{"id":"string","secret":"string","lastUsedTime":"string"}],"scopes":["string"],"logo":"http://example.com","homepage":"http://example.com","redirectUris":["http://example.com"]}'
            };

            try {
              const response = await fetch(url, options);
              const data = await response.json();
              console.log(data);
            } catch (error) {
              console.error(error);
            }
        - lang: Node.js
          source: |-
            const http = require('https');

            const options = {
              method: 'PUT',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/oauth/client/%7BclientId%7D',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              clientId: 'string',
              name: 'string',
              secrets: [{id: 'string', secret: 'string', lastUsedTime: 'string'}],
              scopes: ['string'],
              logo: 'http://example.com',
              homepage: 'http://example.com',
              redirectUris: ['http://example.com']
            }));
            req.end();
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("app.teable.ai")


            payload =
            "{\"clientId\":\"string\",\"name\":\"string\",\"secrets\":[{\"id\":\"string\",\"secret\":\"string\",\"lastUsedTime\":\"string\"}],\"scopes\":[\"string\"],\"logo\":\"http://example.com\",\"homepage\":\"http://example.com\",\"redirectUris\":[\"http://example.com\"]}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("PUT", "/api/oauth/client/%7BclientId%7D", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````