Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita69961b

Browse files
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 parent5ce4cc0 commita69961b

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+
<divclass="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)

[8]ページ先頭

©2009-2025 Movatter.jp