File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -51,15 +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
+ <div class =" tabs " >
55
+
56
+ ## CLI
57
+
54
58
As of Coder v2.17+, you can create long-lived tokens on behalf of other users if
55
59
your account is ` Owner ` . Use the following command:
56
60
57
61
``` sh
58
62
coder tokens create my-token --user < username>
59
63
```
60
64
61
- > See the full API reference for
62
- > [ ` coder tokens create ` ] ( ../../reference/cli/tokens_create.md )
65
+ See the full API reference for
66
+ [ ` coder tokens create ` ] ( ../../reference/cli/tokens_create.md )
67
+
68
+ ## API
69
+
70
+ You can also use the REST API to generate a token on behalf of another user. You
71
+ must have the ` Owner ` role to do this. Use our API reference for more
72
+ information:
73
+ [ Create token API key] ( https://coder.com/docs/reference/api/users#create-token-api-key )
74
+
75
+ </div >
63
76
64
77
### Set max token length
65
78
You can’t perform that action at this time.
0 commit comments