2026-08-11 11:22:55 -04:00
|
|
|
---
|
|
|
|
|
# Code generated by make gen. DO NOT EDIT.
|
|
|
|
|
title: Authentication
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
2022-12-19 18:43:46 +01:00
|
|
|
|
2023-01-04 19:14:47 +01:00
|
|
|
Long-lived tokens can be generated to perform actions on behalf of your user account:
|
|
|
|
|
|
2026-07-15 14:07:09 -04:00
|
|
|
```sh
|
2023-01-04 19:14:47 +01:00
|
|
|
coder tokens create
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
You can use tokens with the Coder's REST API using the `Coder-Session-Token` HTTP header.
|
|
|
|
|
|
2023-02-01 17:05:45 -03:00
|
|
|
```console
|
2023-01-04 19:14:47 +01:00
|
|
|
curl 'http://coder-server:8080/api/v2/workspaces' \
|
|
|
|
|
-H 'Coder-Session-Token: *****'
|
|
|
|
|
```
|