> For the complete documentation index, see [llms.txt](https://bump.sh/nethesis/doc/nethcti-middleware/llms.txt)

# Issue a user integration token (Super Admin only)

> POST /admin/tokens/persistent/{username}/{audience}
> 
> Issue an integration token (e.g. the mobile app QR code token) for the user,
> without the user password. It replaces the previous token of the same audience.
> 
> When the user has no session yet (e.g. never logged in), it is created with
> an internal login on the NethCTI server, authorized by the super admin token
> that the NethCTI server reads from the module environment. It is independent
> from SSO. The token is issued without OTP verification, so it is refused for
> users with 2FA enabled.



## Servers
- Local development server: http://localhost:8080 (Local development server)
- Production server: https://middleware.example.com/api (Production server)


## Authentication methods
- Super admin auth


## Parameters

### Path parameters

- **username** (string)
  Target user (case insensitive)

- **audience** (string)
  Integration token audience. `all` is accepted only by DELETE.




## Responses
### 200
Token issued

#### Body: application/json (object)
- **token** (string)


### 400
Invalid username or audience

### 404
The NethCTI server refused the internal login (unknown or denied user)

### 409
The user has 2FA enabled

### 503
The super admin token is not configured and the user has no session


[Powered by Bump.sh](https://bump.sh)
