Get user details
GEThttps://whatpulse.test/api/v1/users/:id
Get detailed information about a specific user. Returns public profile information that can be viewed by anyone, or private information if you're viewing your own profile or have the appropriate permissions.
Request
Path Parameters
id stringrequired
User ID or username
Responses
- 200
- 401
- 422
UserResource
- application/json
- Schema
- Example (auto)
Schema
- anyOf
- MOD1
- MOD2
user objectrequired
object
{
"user": {
"id": 0,
"username": "string",
"date_joined": "string",
"pulses": 0,
"team_is_manager": true,
"country_id": 0,
"is_premium": true,
"referrals": 0,
"totals": {
"keys": 0,
"clicks": 0,
"download_mb": 0,
"upload_mb": 0,
"uptime_seconds": 0,
"scrolls": 0,
"distance_miles": 0
},
"ranks": {
"keys": 0,
"clicks": 0,
"download": 0,
"upload": 0,
"uptime": 0,
"scrolls": 0,
"distance": 0
},
"include_in_rankings": true,
"distance_system": "metric"
}
}
Unauthenticated
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
Error overview.
{
"message": "string"
}
Validation error
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
Errors overview.
errors objectrequired
{
"message": "string",
"errors": {}
}
Authorization: http
name: httptype: httpscheme: bearer
- go
- java
- javascript
- kotlin
- nodejs
- objective-c
- php
- powershell
- python
- r
- ruby
- rust
- swift
- NATIVE
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://whatpulse.test/api/v1/users/:id"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <token>")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
ResponseClear