Remove Session
DELETEhttp://localhost:3000/api/sessions/:sessionId
Terminate a specific session.
Request
Path Parameters
sessionId stringrequired
The identifier of the session.
Responses
- 204
- 401
- 403
- 404
Session removed successfully.
The request requires user authentication.
- application/json
- Schema
- Example (auto)
Schema
messagestring
Detailed error message.
{
"message": "string"
}
The server understood the request, but refuses to authorize it.
- application/json
- Schema
- Example (auto)
Schema
messagestring
Detailed error message.
{
"message": "string"
}
The specified resource was not found.
- application/json
- Schema
- Example (auto)
Schema
messagestring
Detailed error message.
{
"message": "string"
}
Authorization: http
name: BearerAuthtype: httpscheme: bearerdescription: Authentication using a Bearer token.
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Delete, "http://localhost:3000/api/sessions/:sessionId");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear