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

# Reset Token Settings

> Resets token settings to default values for a credential. All token-related configurations are restored to their default state. The credential is automatically deployed to all environments after token settings are reset. Authentication type is set to SECRET_MANAGER.

## Endpoint

```
DELETE /apiops/projects/{projectName}/credentials/{username}/token/
```

## Authentication

Requires a Personal API Access Token.

### Header

```
Authorization: Bearer YOUR_TOKEN
```

## Request

### Headers

| Header        | Value          | Required |
| ------------- | -------------- | -------- |
| Authorization | Bearer {token} | Yes      |

### Path Parameters

| Parameter   | Type   | Required | Description                |
| ----------- | ------ | -------- | -------------------------- |
| projectName | string | Yes      | Project name               |
| username    | string | Yes      | Username of the credential |

### Notes

* Credential must exist
* All token settings are reset to default values
* Authentication type is set to `SECRET_MANAGER`

## Default Values

After reset, token settings are set to the following default values:

| Field                        | Default Value    |
| ---------------------------- | ---------------- |
| grantType                    | `PASSWORD`       |
| tokenNeverExpires            | `true`           |
| tokenExpiresInAmount         | `null`           |
| tokenExpiresInUnit           | `null`           |
| refreshTokenAllowed          | `null`           |
| refreshTokenCount            | `null`           |
| refreshTokenExpiresInAmount  | `null`           |
| refreshTokenExpiresInUnit    | `null`           |
| allowUrlParameters           | `false`          |
| managedFromThisPolicy        | `true`           |
| jwtSignatureAlgorithm        | `RS256`          |
| deletePrevious               | `false`          |
| enumPolicyAuthenticationType | `SECRET_MANAGER` |

## Response

### Success Response (200 OK)

```json theme={null}
{
  "success": true,
  "deploymentResult": {
    "success": true,
    "message": "Deployment completed successfully",
    "environmentResults": [
      {
        "environmentName": "production",
        "success": true,
        "message": "Deployed successfully"
      },
      {
        "environmentName": "staging",
        "success": true,
        "message": "Deployed successfully"
      }
    ]
  }
}
```

### Error Response (400 Bad Request)

```json theme={null}
{
  "error": "bad_request",
  "error_description": "Credential (username: api-user) was not found!"
}
```

### Error Response (401 Unauthorized)

```json theme={null}
{
  "error": "unauthorized_client",
  "error_description": "Invalid token"
}
```

### Error Response (404 Not Found)

```json theme={null}
{
  "error": "not_found",
  "error_description": "Project(MyProject) was not found or user does not have privilege to access it!"
}
```

## cURL Example

```bash theme={null}
curl -X DELETE \
  "https://demo.apinizer.com/apiops/projects/MyProject/credentials/api-user/token/" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Notes and Warnings

* **Complete Reset**:
  * All token settings are reset to default values
  * Previous customizations are lost
  * Use set endpoint to configure specific values

* **Default Behavior**:
  * Token never expires by default (`tokenNeverExpires: true`)
  * Refresh token is disabled by default
  * URL parameters are not allowed by default
  * JWT signature algorithm is `RS256` by default

* **Authentication Type**:
  * Authentication type is set to `SECRET_MANAGER`
  * This is the required value for APIOps token settings

* **Automatic Deployment**:
  * Credential is automatically deployed to all environments after reset
  * Deployment results are returned in the response

## Permissions

* User must have **`IDENTITY` + `MANAGE`** permission in the project
* For automatic deployment, user must also have **`IDENTITY` + `DEPLOY_UNDEPLOY`** permission

## Related Documentation

* [Set Token Settings](/api-reference/credentials/token-settings/set-token-settings) - Configure token settings
* [Set JWK Validation](/api-reference/credentials/jwk-settings/set-jwk-validation) - Assign JWK for validation and signing
* [List Credentials](/api-reference/credentials/crud/list-credentials) - List all credentials
