Skip to content

Commit a69961b

Browse files
bpmctEdwardAngert
andauthored
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>
1 parent 5ce4cc0 commit a69961b

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

docs/admin/users/sessions-tokens.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,28 @@ See the help docs for
5151

5252
### Generate a long-lived API token on behalf of another user
5353

54-
Today, you must use the REST API to generate a token on behalf of another user.
55-
You must have the `Owner` role to do this. Use our API reference for more
56-
information:
57-
[Create token API key](https://coder.com/docs/reference/api/users#create-token-api-key)
54+
You must have the `Owner` role to generate a token for another user.
55+
56+
As of Coder v2.17+, you can use the CLI or API to create long-lived tokens on
57+
behalf of other users. Use the API for earlier versions of Coder.
58+
59+
<div class="tabs">
60+
61+
#### CLI
62+
63+
```sh
64+
coder tokens create my-token --user <username>
65+
```
66+
67+
See the full CLI reference for
68+
[`coder tokens create`](../../reference/cli/tokens_create.md)
69+
70+
#### API
71+
72+
Use our API reference for more information on how to
73+
[create token API key](../../reference/api/users.md#create-token-api-key)
74+
75+
</div>
5876

5977
### Set max token length
6078

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy