GET /me/avatar/serve/{userID}/{filename}
Entrega o avatar público de qualquer user (rota sem auth).
- Access: Public
- Service:
https://api.axuz.net
Accepted authentication
No authentication (public route, or protected by link/signature).
Entradas: {userID} e {filename} pela URL. Filename precisa ser opaco (sem separadores) — a validação impede path traversal.
Retorno: 302 redirect pro presigned GET quando o uploader é S3/R2 (Cache-Control 1 dia); 200 com bytes + Content-Type derivado da extensão no fallback local/bunny; 400 params inválidos; 404 objeto ausente; 500 falha de presign.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
userID | path | string | yes | |
filename | path | string | yes |
Responses
200
TBD
302
Redirect pro presigned GET quando o uploader é S3/R2 (Cache-Control 1 dia)
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
400
Params inválidos
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
404
Objeto ausente
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
429
Limite de requisições excedido.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
500
Falha de presign
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
Examples
"Try it" is turned off in this reference. Use the examples with your test credential.
curl
curl -sS -X GET 'https://api.axuz.net/me/avatar/serve/USER_ID/FILENAME'Node.js
const res = await fetch("https://api.axuz.net/me/avatar/serve/USER_ID/FILENAME", {
method: 'GET',
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());Python
import os
import requests
res = requests.request(
"GET",
"https://api.axuz.net/me/avatar/serve/USER_ID/FILENAME",
timeout=30,
)
res.raise_for_status()
print(res.json())