How to revoke Gitlab authorize token?

I use Gitlab OpenID Connect. I want to implement sign-out logic in my app. But I can’t figure out how to revoke tokens for users. I tried to send post and delete requests on /oauth/revoke, but it did not work.
Basic logic I want to implement:
oidc =
super(AuthOIDCView, self).logout()
payload = { “client_id”: config.get(‘client_id’), “client_secret”: config.get(‘client_secret’), “token”: config.get(‘token’) }
headers = { ‘content-type’: “application/json” }“”, data=payload, headers=headers)

I’ve figured out the question. If someone will have the same question, to revoke the token you should do next:

from requests.auth import HTTPBasicAuth
import requests
payload = {"token": <your_access_token>
            "token_type_hint": "refresh_token"
auth = HTTPBasicAuth(<your client_id>, <your client_secret >)
res =“”,