# Generate a new secret

> Generate a new client secret for an external OAuth client in an Automation Suite organization using the Identity API, including required scope and response schema.

Generate a new client secret for the given external client.

## API endpoint

`GET https://{yourDomain}/{organizationName}/identity_/api/ExternalClient/{partitionGlobalId}/{clientId}`

## Scopes

Requires either one of the following scopes:

* `PM.OAuthApp`
* `PM.OAuthApp.Write`
* `PM.OAuthSecret.Write`

## Request headers

```
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
```

:::note
To obtain the `{access_token}`, make sure to authenticate through one of the methods described in [Authentication methods](https://docs.uipath.com/automation-suite/automation-suite/2.2510/api-guide/authentication-methods#authentication-methods).
:::

## Request body

The request body contains the organization ID where the external client is located, and the corresponding client ID.

```
{
  "partitionGlobalId": "<organizationId>",
  "clientId": "<clientId>"
}
```

## Responses

### 200 Success

The client secret has been successfully created for the given external client.

```
"string"
```
