Get Current User
GEThttp://localhost:3000/api/whoami
Retrieve information about the current user session.
Responses
- 200
- 401
- 403
Current user information retrieved successfully.
- application/json
- Schema
- Example (auto)
Schema
idstring
The unique identifier of the session.
profile object
state object
{
"id": "string",
"profile": {
"name": "string",
"is_admin": true,
"can_login": true,
"can_connect": true,
"can_watch": true,
"can_host": true,
"can_share_media": true,
"can_access_clipboard": true,
"sends_inactive_cursor": true,
"can_see_inactive_cursors": true,
"plugins": {}
},
"state": {
"is_connected": true,
"is_watching": true
}
}
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"
}
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.Get, "http://localhost:3000/api/whoami");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear