Skip to main content
GET
/
users
/
{emailOrID}
Get User
curl --request GET \
  --url https://use.hoop.dev/api/users/{emailOrID}
import requests

url = "https://use.hoop.dev/api/users/{emailOrID}"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://use.hoop.dev/api/users/{emailOrID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://use.hoop.dev/api/users/{emailOrID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://use.hoop.dev/api/users/{emailOrID}"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://use.hoop.dev/api/users/{emailOrID}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://use.hoop.dev/api/users/{emailOrID}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "email": "jsmith@example.com",
  "groups": [
    "sre",
    "dba"
  ],
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "John Wick",
  "password": "mysecurepassword",
  "picture": "",
  "role": "standard",
  "slack_id": "U053ELZHB53",
  "status": "active",
  "verified": true
}
{
"message": "the error description"
}
{
"message": "the error description"
}

Path Parameters

emailOrID
string
required

The subject identifier or email of the user

Response

OK

email
string<email>
required

Email address of the user

groups
string[]

Groups registered for this user

Example:
["sre", "dba"]
id
string<uuid>
read-only

Unique identifier of the resource

name
string

Display name

Example:

"John Wick"

password
string

Local auth cases have a password

Example:

"mysecurepassword"

picture
string

The profile picture url to display

Example:

""

role
enum<string>
read-only

Permission related to the user

  • admin - Has super privileges and has access to any resource in the system
  • standard - Grant access to standard routes.
  • unregistered - Grant access to unregistered routes. It's a transient state where the user is authenticated but is not registered. This state is only available for multi tenant environments
Available options:
admin,
standard,
unregistered
Example:

"standard"

slack_id
string

The identifier of slack to send messages to users

Example:

"U053ELZHB53"

status
enum<string>
default:active

The status of the user. Inactive users cannot access the system

Available options:
active,
inactive,
invited
verified
boolean
read-only

DEPRECATED in flavor of role