---
title: "Set Token Settings for Credential"
method: PUT
path: "/apiops/projects/{projectName}/credentials/{username}/token/"
tags: ["Credential"]
deprecated: true
---

# Set Token Settings for Credential

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

## Request

- Base URL: `http://167.86.118.166:32080`
- URL: `http://167.86.118.166:32080/apiops/projects/{projectName}/credentials/{username}/token/`
- Auth: none declared
- TypeScript: <https://skmtc.dev/apinizer/apis/apinizer-management-apis/docs/apiops/projects/:projectName/credentials/:username/token/put.ts> (a function with typed inputs; its response is checked against the schema)

> **Deprecated.**

Sets token settings for credential specified by username and deploys it to environments

## Path parameters

- `projectName` string, required
- `username` string, required

## Request body

- TokenSettingsDTO: Token settings for credential
  - `grantType` 'CLIENT_CREDENTIALS' | 'PASSWORD': Grant type for authentication
  - `tokenNeverExpires` boolean: Whether token never expires
  - `tokenExpiresInAmount` integer: Token expiration amount
  - `tokenExpiresInUnit` 'MILLI_SECONDS' | 'SECONDS' | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS': Token expiration unit
  - `refreshTokenAllowed` boolean: Whether refresh token is allowed
  - `refreshTokenCount` integer: Refresh token count
  - `refreshTokenExpiresInAmount` integer: Refresh token expiration amount
  - `refreshTokenExpiresInUnit` 'MILLI_SECONDS' | 'SECONDS' | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS': Refresh token expiration unit
  - `allowUrlParameters` boolean: Whether URL parameters are allowed
  - `jwtSignatureAlgorithm` string: JWT signature algorithm
  - `deletePrevious` boolean: Whether to delete previous tokens

## Response `200`

successful operation!

- ApiOpsResponseSuccess
  - `status` 'SUCCESS' | 'FAILURE'
  - `resultMessage` string
  - `resultList` string[]
  - `resultCount` integer
  - `deploymentResult` DeploymentResult
    - `envName` string
    - `podName` string
    - `podIp` string
    - `success` boolean
    - `detail` string
    - `responseTime` integer
    - `detailList` unknown[]
      - unknown
    - `firstFromApiResultList` unknown
  - `unresolvedReferences` string[]
  - `advisories` ApiOpsAdvisoryDTO[]
    - `level` string
    - `key` string
    - `params` object

## Other responses

- `401`: not authorized for this operation!
- `500`: internal error!

## Changes

- **2026-10-20** `d1a546deccf0`: 9 breaking
  - request property `grantType` was restricted to a list of enum values
  - request property `refreshTokenExpiresInUnit` was restricted to a list of enum values
  - request property `tokenExpiresInUnit` was restricted to a list of enum values
  - the `grantType` request property type changed from `object` to `string`
  - …5 more
  - …this revision’s changelog is incomplete
- **2026-08-11** `9ae232e55479`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/apinizer/apis/apinizer-management-apis/changes/apiops/projects/:projectName/credentials/:username/token/put.md)

---

[API](https://skmtc.dev/apinizer/apis/apinizer-management-apis.md) - [All operations](https://skmtc.dev/apinizer/apis/apinizer-management-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/apinizer/apis/apinizer-management-apis/revisions/e083046b24cd?raw)
