> For the complete documentation index, see [llms.txt](https://doklado-mnojd9vj.documentationai.com/llms.txt).
> Use it to discover all available pages before exploring further.

# Revoke token

Zrušenie tokenu. Príklad používa refresh token a token_type_hint=refresh_token; Bearer token sa pri tomto volaní neposiela.


<PlaygroundComponent />

<BodyParams contentTypes={["application/json"]} defaultType="application/json">
  <ContentType type="application/json">
<ParamField showLocation="false" body="token" param-type="string" required="false">

</ParamField>

<ParamField showLocation="false" body="token_type_hint" param-type="string" required="false" examples-b64="W3sibmFtZSI6ImV4YW1wbGUiLCJ2YWx1ZSI6InJlZnJlc2hfdG9rZW4ifV0=">

</ParamField>
  </ContentType>
</BodyParams>

<Request tabs="curl,python,javascript,go,ruby">

```bash
curl -X POST "https://einvoice-v1-ynyiur6quq-ey.a.run.app/v1/sapi/auth/revoke" \
  -H "Content-Type: application/json" \
  -d '{
  "token": "example_string",
  "token_type_hint": "refresh_token"
}'
```

```python
import requests
import json

url = "https://einvoice-v1-ynyiur6quq-ey.a.run.app/v1/sapi/auth/revoke"
headers = {
  "Content-Type": "application/json"
}
data = {
  "token": "example_string",
  "token_type_hint": "refresh_token"
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
```

```javascript
const response = await fetch("https://einvoice-v1-ynyiur6quq-ey.a.run.app/v1/sapi/auth/revoke", {
  method: "POST",
  headers: {
  "Content-Type": "application/json"
},
  body: JSON.stringify({
  "token": "example_string",
  "token_type_hint": "refresh_token"
})
});

const data = await response.json();
console.log(data);
```

```go
package main

import (
    "fmt"
    "net/http"
    "bytes"
    "encoding/json"
)

func main() {
    data := []byte(`{
  "token": "example_string",
  "token_type_hint": "refresh_token"
}`)

    req, err := http.NewRequest("POST", "https://einvoice-v1-ynyiur6quq-ey.a.run.app/v1/sapi/auth/revoke", bytes.NewBuffer(data))
    if err != nil {
        panic(err)
    }

    req.Header.Set("Content-Type", "application/json")

    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    fmt.Println("Response Status:", resp.Status)
}
```

```ruby
require 'net/http'
require 'json'

uri = URI('https://einvoice-v1-ynyiur6quq-ey.a.run.app/v1/sapi/auth/revoke')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
  "token": "example_string",
  "token_type_hint": "refresh_token"
}'

response = http.request(request)
puts response.body
```

</Request>

### Responses

<div data-component="ResponsesCollection"><Expandable title="default - Formát a HTTP stavy odpovede nie sú potvrdené." default-open="false">

*Formát a HTTP stavy odpovede nie sú potvrdené.*

</Expandable>

</div>

<Response tabs="default">

```json
{}
```

</Response>

