--- id: delete-token title: "Delete a Token" description: "Delete a token for a user" sidebar_label: "Delete a Token" hide_title: true hide_table_of_contents: true api: {"description":"Delete a token for a user","tags":["Tokens"],"operationId":"deleteToken","security":[{"BearerAuth":[]},{"TokenAuth":[]}],"parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a user"},{"in":"path","name":"tokenId","required":true,"schema":{"type":"string"},"description":"The unique identifier of a token"}],"responses":{"200":{"description":"Delete status code","content":{}},"400":{"description":"Bad Request","content":{}},"401":{"description":"Requires authentication","content":{}},"403":{"description":"Forbidden","content":{}},"500":{"description":"Internal Server Error","content":{}}},"method":"delete","path":"/api/users/{userId}/tokens/{tokenId}","servers":[{"url":"https://netbird.io","description":"Default server"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"TokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Prefix the value with \\\"Token\\\" to indicate the custom authorization type"}},"info":{"title":"NetBird REST API","description":"API to manipulate groups, rules, policies and retrieve information about peers and users","version":"0.0.1"},"postman":{"name":"Delete a Token","description":{"content":"Delete a token for a user","type":"text/plain"},"url":{"path":["api","users",":userId","tokens",":tokenId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The unique identifier of a user","type":"text/plain"},"type":"any","value":"","key":"userId"},{"disabled":false,"description":{"content":"(Required) The unique identifier of a token","type":"text/plain"},"type":"any","value":"","key":"tokenId"}]},"method":"DELETE","auth":{"type":"bearer","bearer":[{"type":"any","value":"","key":"token"}]}}} sidebar_class_name: "delete api-method" info_path: api/netbird-rest-api custom_edit_url: null --- import ApiTabs from "@theme/ApiTabs"; import MimeTabs from "@theme/MimeTabs"; import ParamsItem from "@theme/ParamsItem"; import ResponseSamples from "@theme/ResponseSamples"; import SchemaItem from "@theme/SchemaItem"; import SchemaTabs from "@theme/SchemaTabs"; import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import TabItem from "@theme/TabItem"; ## Delete a Token Delete a token for a user
Path Parameters
Delete status code
Bad Request
Requires authentication
Forbidden
Internal Server Error