personal_tokens_destroy
DELETE
/api/personal-tokens/{id}/
const url = 'https://example.com/api/personal-tokens/1/';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/api/personal-tokens/1/ \ --header 'Authorization: Bearer <token>'Delete a personal access token.
Parameters
request : Request The request object containing the token’s details.
Returns
Response A response containing no data and a 204 status code.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
A unique integer value identifying this Personal Access Token.
Responses
Section titled “Responses”No response body
Media typeapplication/json
object
code
required
string
message
required
string
details
required
Array<object>
object
parameter
string
code
string
message
string
Example
{ "code": "forbidden", "message": "You do not have permission to perform this operation. Check the `details` property for more details.", "details": [ { "parameter": "personal access token", "code": "not_allowed", "message": "Revoke the token before deleting it." } ]}
