File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,28 @@ See the help docs for
51
51
52
52
### Generate a long-lived API token on behalf of another user
53
53
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 >
58
76
59
77
### Set max token length
60
78
You can’t perform that action at this time.
0 commit comments