curl --request POST \
--url https://api.outerproduct.com/outerproduct.user.v1alpha.UserService/UpdateUserPhoto \
--header 'Authorization: Bearer <token>' \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--data '
{
"photo": {
"contentType": "<string>",
"data": "aSDinaTvuI8gbWludGxpZnk="
},
"name": "<string>",
"thumbnail": "<string>"
}
'import requests
url = "https://api.outerproduct.com/outerproduct.user.v1alpha.UserService/UpdateUserPhoto"
payload = {
"photo": {
"contentType": "<string>",
"data": "aSDinaTvuI8gbWludGxpZnk="
},
"name": "<string>",
"thumbnail": "<string>"
}
headers = {
"Connect-Protocol-Version": "<connect-protocol-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
photo: {contentType: '<string>', data: 'aSDinaTvuI8gbWludGxpZnk='},
name: '<string>',
thumbnail: '<string>'
})
};
fetch('https://api.outerproduct.com/outerproduct.user.v1alpha.UserService/UpdateUserPhoto', 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://api.outerproduct.com/outerproduct.user.v1alpha.UserService/UpdateUserPhoto",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'photo' => [
'contentType' => '<string>',
'data' => 'aSDinaTvuI8gbWludGxpZnk='
],
'name' => '<string>',
'thumbnail' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Connect-Protocol-Version: <connect-protocol-version>",
"Content-Type: application/json"
],
]);
$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://api.outerproduct.com/outerproduct.user.v1alpha.UserService/UpdateUserPhoto"
payload := strings.NewReader("{\n \"photo\": {\n \"contentType\": \"<string>\",\n \"data\": \"aSDinaTvuI8gbWludGxpZnk=\"\n },\n \"name\": \"<string>\",\n \"thumbnail\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Connect-Protocol-Version", "<connect-protocol-version>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.outerproduct.com/outerproduct.user.v1alpha.UserService/UpdateUserPhoto")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"photo\": {\n \"contentType\": \"<string>\",\n \"data\": \"aSDinaTvuI8gbWludGxpZnk=\"\n },\n \"name\": \"<string>\",\n \"thumbnail\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerproduct.com/outerproduct.user.v1alpha.UserService/UpdateUserPhoto")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Connect-Protocol-Version"] = '<connect-protocol-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"photo\": {\n \"contentType\": \"<string>\",\n \"data\": \"aSDinaTvuI8gbWludGxpZnk=\"\n },\n \"name\": \"<string>\",\n \"thumbnail\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"email": "<string>",
"emailVerified": true,
"image": "<string>",
"username": "<string>",
"displayUsername": "<string>",
"createdAt": "2023-01-15T01:30:15.01Z",
"updatedAt": "2023-01-15T01:30:15.01Z",
"banned": true,
"banReason": "<string>",
"banExpires": "2023-01-15T01:30:15.01Z"
}{
"code": "not_found",
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}UpdateUserPhoto
Stores the full photo and sets the user’s image to its thumbnail. Updating the image through UpdateUser removes the stored photo.
curl --request POST \
--url https://api.outerproduct.com/outerproduct.user.v1alpha.UserService/UpdateUserPhoto \
--header 'Authorization: Bearer <token>' \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--data '
{
"photo": {
"contentType": "<string>",
"data": "aSDinaTvuI8gbWludGxpZnk="
},
"name": "<string>",
"thumbnail": "<string>"
}
'import requests
url = "https://api.outerproduct.com/outerproduct.user.v1alpha.UserService/UpdateUserPhoto"
payload = {
"photo": {
"contentType": "<string>",
"data": "aSDinaTvuI8gbWludGxpZnk="
},
"name": "<string>",
"thumbnail": "<string>"
}
headers = {
"Connect-Protocol-Version": "<connect-protocol-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
photo: {contentType: '<string>', data: 'aSDinaTvuI8gbWludGxpZnk='},
name: '<string>',
thumbnail: '<string>'
})
};
fetch('https://api.outerproduct.com/outerproduct.user.v1alpha.UserService/UpdateUserPhoto', 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://api.outerproduct.com/outerproduct.user.v1alpha.UserService/UpdateUserPhoto",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'photo' => [
'contentType' => '<string>',
'data' => 'aSDinaTvuI8gbWludGxpZnk='
],
'name' => '<string>',
'thumbnail' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Connect-Protocol-Version: <connect-protocol-version>",
"Content-Type: application/json"
],
]);
$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://api.outerproduct.com/outerproduct.user.v1alpha.UserService/UpdateUserPhoto"
payload := strings.NewReader("{\n \"photo\": {\n \"contentType\": \"<string>\",\n \"data\": \"aSDinaTvuI8gbWludGxpZnk=\"\n },\n \"name\": \"<string>\",\n \"thumbnail\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Connect-Protocol-Version", "<connect-protocol-version>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.outerproduct.com/outerproduct.user.v1alpha.UserService/UpdateUserPhoto")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"photo\": {\n \"contentType\": \"<string>\",\n \"data\": \"aSDinaTvuI8gbWludGxpZnk=\"\n },\n \"name\": \"<string>\",\n \"thumbnail\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerproduct.com/outerproduct.user.v1alpha.UserService/UpdateUserPhoto")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Connect-Protocol-Version"] = '<connect-protocol-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"photo\": {\n \"contentType\": \"<string>\",\n \"data\": \"aSDinaTvuI8gbWludGxpZnk=\"\n },\n \"name\": \"<string>\",\n \"thumbnail\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"email": "<string>",
"emailVerified": true,
"image": "<string>",
"username": "<string>",
"displayUsername": "<string>",
"createdAt": "2023-01-15T01:30:15.01Z",
"updatedAt": "2023-01-15T01:30:15.01Z",
"banned": true,
"banReason": "<string>",
"banExpires": "2023-01-15T01:30:15.01Z"
}{
"code": "not_found",
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}Authorizations
A user session token or personal API key.
Headers
Define the version of the Connect protocol
1
Define the timeout, in ms
1000
Body
Response
Success
RustAuth's user model. The native authentication ID is the application user ID.
256254A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (Z); input may use an offset from UTC.
"2023-01-15T01:30:15.01Z"
A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (Z); input may use an offset from UTC.
"2023-01-15T01:30:15.01Z"
RustAuth's admin plugin fields, matching the generated users table.
A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (Z); input may use an offset from UTC.
"2023-01-15T01:30:15.01Z"