From 5c4ec96f8a9cba155f606ad7bc474c2717bec8c9 Mon Sep 17 00:00:00 2001 From: Ben Potter Date: Fri, 18 Oct 2024 16:28:11 +0000 Subject: [PATCH 1/3] Update session-tokens docs for token creation --- docs/admin/users/sessions-tokens.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/admin/users/sessions-tokens.md b/docs/admin/users/sessions-tokens.md index dbbcfb82dfd47..39206fcd8084c 100644 --- a/docs/admin/users/sessions-tokens.md +++ b/docs/admin/users/sessions-tokens.md @@ -51,10 +51,15 @@ 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) +As of Coder v2.17+, you can create long-lived tokens on behalf of other users if +your account is `Owner`. Use the following command: + +```sh +coder tokens create my-token --user +``` + +> See the full API reference for +> [`coder tokens create`](../../reference/cli/tokens_create.md) ### Set max token length From 395803132ac22a63f2914aa9dfc9c99cbadc6d1a Mon Sep 17 00:00:00 2001 From: Ben Potter Date: Fri, 18 Oct 2024 16:34:19 +0000 Subject: [PATCH 2/3] Update session-tokens docs for token creation Add instructions for generating tokens via REST API and CLI. --- docs/admin/users/sessions-tokens.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/admin/users/sessions-tokens.md b/docs/admin/users/sessions-tokens.md index 39206fcd8084c..fa1f3e4ade0e2 100644 --- a/docs/admin/users/sessions-tokens.md +++ b/docs/admin/users/sessions-tokens.md @@ -51,6 +51,10 @@ See the help docs for ### Generate a long-lived API token on behalf of another user +
+ +## CLI + As of Coder v2.17+, you can create long-lived tokens on behalf of other users if your account is `Owner`. Use the following command: @@ -58,8 +62,17 @@ your account is `Owner`. Use the following command: coder tokens create my-token --user ``` -> See the full API reference for -> [`coder tokens create`](../../reference/cli/tokens_create.md) +See the full API reference for +[`coder tokens create`](../../reference/cli/tokens_create.md) + +## API + +You can also 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) + +
### Set max token length From 404cef71060883024d8bd3392fe95bca3852c04d Mon Sep 17 00:00:00 2001 From: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com> Date: Wed, 12 Feb 2025 19:44:53 +0000 Subject: [PATCH 3/3] md edit --- docs/admin/users/sessions-tokens.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/admin/users/sessions-tokens.md b/docs/admin/users/sessions-tokens.md index fa1f3e4ade0e2..6332b8182fc17 100644 --- a/docs/admin/users/sessions-tokens.md +++ b/docs/admin/users/sessions-tokens.md @@ -51,26 +51,26 @@ See the help docs for ### Generate a long-lived API token on behalf of another user -
+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. -## CLI +
-As of Coder v2.17+, you can create long-lived tokens on behalf of other users if -your account is `Owner`. Use the following command: +#### CLI ```sh coder tokens create my-token --user ``` -See the full API reference for +See the full CLI reference for [`coder tokens create`](../../reference/cli/tokens_create.md) -## API +#### API -You can also 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) +Use our API reference for more information on how to +[create token API key](../../reference/api/users.md#create-token-api-key)
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