# createOAuthClientSecret

Mutation · GraphQL API

Create an OAuth client secret.
To call this mutation you must obtain an OAuth Access Token with scope MANAGE_OAUTH_CLIENT_SECRETS,
the associated merchant must have [IP or hostname restrictions](https://developer.paypal.com/braintree/articles/risk-and-security/allowlisting) enabled and you must send your request from a host
that is allowed by the merchant's allowed hosts list.

## Authentication

- SERVER

## Input

- `input` (`CreateOAuthClientSecretInput!`) — required

## Returns [CreateOAuthClientSecretPayload](/braintree/graphql/reference/types/create-o-auth-client-secret-payload)

Details about OAuth client secret created for merchant.

### Returned fields

- `clientMutationId` (`String`): An identifier used to reconcile requests and responses. 255 characters maximum.
- `secret` (`String`): The client secret value.

## Examples

### Create OAuth client secret

Input fields for creating a new OAuth client secret.

```graphql
mutation createOAuthClientSecret($input: CreateOAuthClientSecretInput!) {
  createOAuthClientSecret(input: $input) {
    clientMutationId
    secret
  }
}
```

---

[View the complete GraphQL schema on GitHub](https://raw.githubusercontent.com/braintree/graphql-api/refs/heads/master/schema.graphql)