---
title: Delete OAuth Client
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/go)

[IAM](https://developers.cloudflare.com/api/go/resources/iam)

[OAuth Clients](https://developers.cloudflare.com/api/go/resources/iam/subresources/oauth%5Fclients)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Delete OAuth Client

client.IAM.OAuthClients.Delete(ctx, oauthClientID, body) (\*[OAuthClientDeleteResponse](https://developers.cloudflare.com/api/go/resources/iam#%28resource%29%20iam.oauth%5Fclients%20%3E%20%28model%29%20OAuthClientDeleteResponse%20%3E%20%28schema%29), error)

DELETE/accounts/{account\_id}/oauth\_clients/{oauth\_client\_id}

Delete an OAuth client.

##### Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).

**Example:**`Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY`

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**`X-Auth-Email: user@example.com`

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**`X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194`

##### Accepted Permissions (at least one required)

`OAuth Client Write`

##### ParametersExpand Collapse 

oauthClientID string

The unique identifier for an OAuth client.

body OAuthClientDeleteParams

AccountID param.Field\[string\]

Account identifier tag.

maxLength32

minLength32

##### ReturnsExpand Collapse 

type OAuthClientDeleteResponse struct{…}

ID string

Identifier

maxLength32

minLength32

### Delete OAuth Client

Go

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/iam"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  oauthClient, err := client.IAM.OAuthClients.Delete(
    context.TODO(),
    "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
    iam.OAuthClientDeleteParams{
      AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", oauthClient.ID)
}

```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "023e105f4ecef8ad9ca31a8372d0c353"
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "023e105f4ecef8ad9ca31a8372d0c353"
  }
}
```