Axuz Developers

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

NameInTypeRequiredDescription
userIDpathstringyes
filenamepathstringyes

Responses

200

TBD

302

Redirect pro presigned GET quando o uploader é S3/R2 (Cache-Control 1 dia)

NameTypeRequiredDescription
errorstringyes

400

Params inválidos

NameTypeRequiredDescription
errorstringyes

404

Objeto ausente

NameTypeRequiredDescription
errorstringyes

429

Limite de requisições excedido.

NameTypeRequiredDescription
errorstringyes

500

Falha de presign

NameTypeRequiredDescription
errorstringyes

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())