mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
docs: add mention of CLI command to create token on behalf of another user (#15138)
this was completed by #14813, but not documented --------- Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
This commit is contained in:
co-authored by
EdwardAngert
parent
5ce4cc07de
commit
a69961bbd2
@@ -51,10 +51,28 @@ See the help docs for
|
||||
|
||||
### Generate a long-lived API token on behalf of another user
|
||||
|
||||
Today, you must use the REST API to generate a token on behalf of another user.
|
||||
You must have the `Owner` role to do this. Use our API reference for more
|
||||
information:
|
||||
[Create token API key](https://coder.com/docs/reference/api/users#create-token-api-key)
|
||||
You must have the `Owner` role to generate a token for another user.
|
||||
|
||||
As of Coder v2.17+, you can use the CLI or API to create long-lived tokens on
|
||||
behalf of other users. Use the API for earlier versions of Coder.
|
||||
|
||||
<div class="tabs">
|
||||
|
||||
#### CLI
|
||||
|
||||
```sh
|
||||
coder tokens create my-token --user <username>
|
||||
```
|
||||
|
||||
See the full CLI reference for
|
||||
[`coder tokens create`](../../reference/cli/tokens_create.md)
|
||||
|
||||
#### API
|
||||
|
||||
Use our API reference for more information on how to
|
||||
[create token API key](../../reference/api/users.md#create-token-api-key)
|
||||
|
||||
</div>
|
||||
|
||||
### Set max token length
|
||||
|
||||
|
||||
Reference in New Issue
Block a user