2022-12-19 17:43:46 +00:00
|
|
|
# Authentication
|
|
|
|
|
2023-01-04 18:14:47 +00:00
|
|
|
Long-lived tokens can be generated to perform actions on behalf of your user account:
|
|
|
|
|
2023-02-01 20:05:45 +00:00
|
|
|
```console
|
2023-01-04 18:14:47 +00:00
|
|
|
coder tokens create
|
|
|
|
```
|
|
|
|
|
|
|
|
You can use tokens with the Coder's REST API using the `Coder-Session-Token` HTTP header.
|
|
|
|
|
2023-02-01 20:05:45 +00:00
|
|
|
```console
|
2023-01-04 18:14:47 +00:00
|
|
|
curl 'http://coder-server:8080/api/v2/workspaces' \
|
|
|
|
-H 'Coder-Session-Token: *****'
|
|
|
|
```
|