vault/website/content/api-docs/system/decode-token.mdx
2023-09-21 12:07:25 -07:00

33 lines
834 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
layout: api
page_title: /sys/decode-token - HTTP API
description: The `/sys/decode-token` endpoint is used to decode the encoded token which is the result of /sys/generate-root.
---
# `/sys/decode-token`
@include 'alerts/restricted-root.mdx'
The `/sys/decode-token` endpoint is used to decode the encoded token which is the result of the [/sys/generate-root](/vault/api-docs/system/generate-root) API.
## Parameters
- `encoded_token` `(string: <required>)`  Specifies the encoded token (result from /sys/generate-root).
- `otp` `(string: <required>)` - Specifies the otp code for decode.
## Sample response
```json
{
"request_id": "9bc0fab8-d65c-3961-afe6-d05f50c5fd22",
"lease_id": "",
"lease_duration": 0,
"renewable": false,
"data": {
"token": "4RUmoevJ3lsLni9sTXcNnRE1"
},
"warnings": null
}
```