Patch User Slack ID
curl --request PATCH \
--url https://use.hoop.dev/api/users/self/slack \
--header 'Content-Type: */*' \
--data '
{
"slack_id": "U053ELZHB53"
}
'import requests
url = "https://use.hoop.dev/api/users/self/slack"
payload = { "slack_id": "U053ELZHB53" }
headers = {"Content-Type": "*/*"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': '*/*'},
body: JSON.stringify({slack_id: 'U053ELZHB53'})
};
fetch('https://use.hoop.dev/api/users/self/slack', 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/self/slack",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'slack_id' => 'U053ELZHB53'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: */*"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://use.hoop.dev/api/users/self/slack"
payload := strings.NewReader("{\n \"slack_id\": \"U053ELZHB53\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "*/*")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://use.hoop.dev/api/users/self/slack")
.header("Content-Type", "*/*")
.body("{\n \"slack_id\": \"U053ELZHB53\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/users/self/slack")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = '*/*'
request.body = "{\n \"slack_id\": \"U053ELZHB53\"\n}"
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"
}{
"message": "the error description"
}User Management
Patch User Slack ID
Patch own user’s slack id
PATCH
/
users
/
self
/
slack
Patch User Slack ID
curl --request PATCH \
--url https://use.hoop.dev/api/users/self/slack \
--header 'Content-Type: */*' \
--data '
{
"slack_id": "U053ELZHB53"
}
'import requests
url = "https://use.hoop.dev/api/users/self/slack"
payload = { "slack_id": "U053ELZHB53" }
headers = {"Content-Type": "*/*"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': '*/*'},
body: JSON.stringify({slack_id: 'U053ELZHB53'})
};
fetch('https://use.hoop.dev/api/users/self/slack', 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/self/slack",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'slack_id' => 'U053ELZHB53'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: */*"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://use.hoop.dev/api/users/self/slack"
payload := strings.NewReader("{\n \"slack_id\": \"U053ELZHB53\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "*/*")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://use.hoop.dev/api/users/self/slack")
.header("Content-Type", "*/*")
.body("{\n \"slack_id\": \"U053ELZHB53\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/users/self/slack")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = '*/*'
request.body = "{\n \"slack_id\": \"U053ELZHB53\"\n}"
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"
}{
"message": "the error description"
}Body
*/*
The request body resource
Example:
"U053ELZHB53"
Response
OK
Email address of the user
Groups registered for this user
Example:
["sre", "dba"]
Unique identifier of the resource
Display name
Example:
"John Wick"
Local auth cases have a password
Example:
"mysecurepassword"
The profile picture url to display
Example:
""
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"
The identifier of slack to send messages to users
Example:
"U053ELZHB53"
The status of the user. Inactive users cannot access the system
Available options:
active, inactive, invited DEPRECATED in flavor of role
Was this page helpful?