mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-16 22:06:29 +00:00
Update auth_api.md
This commit is contained in:
parent
cfa016e33a
commit
ca5f783b1a
@ -145,6 +145,7 @@ A long-lived access token is usally used for 3rd party API calls and webhook-ish
|
|||||||
|
|
||||||
Send websocket command `auth/long_lived_access_token` will create a long-lived access token for current user. Access token will not be saved in Home Assistant. User need to record the token in secure place.
|
Send websocket command `auth/long_lived_access_token` will create a long-lived access token for current user. Access token will not be saved in Home Assistant. User need to record the token in secure place.
|
||||||
|
|
||||||
|
```json
|
||||||
{
|
{
|
||||||
"id": 11,
|
"id": 11,
|
||||||
"type": "auth/long_lived_access_token",
|
"type": "auth/long_lived_access_token",
|
||||||
@ -152,15 +153,18 @@ Send websocket command `auth/long_lived_access_token` will create a long-lived a
|
|||||||
"client_icon": null,
|
"client_icon": null,
|
||||||
"lifespan": 365
|
"lifespan": 365
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Result will be a long-lived access token:
|
Result will be a long-lived access token:
|
||||||
|
|
||||||
|
```json
|
||||||
{
|
{
|
||||||
"id": 11,
|
"id": 11,
|
||||||
"type": "result",
|
"type": "result",
|
||||||
"success": true,
|
"success": true,
|
||||||
"result": "ABCDEFGH"
|
"result": "ABCDEFGH"
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Making authenticated requests
|
## Making authenticated requests
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user