Zum Inhalt springen

Emite e renova tokens OAuth do MCP

POST/oauth/token

Auth
Token erforderlich
Die Beschreibungen der Endpoints stammen aus der API-Spezifikation und sind vorerst auf Portugiesisch. Die Oberfläche drumherum ist übersetzt.

`grant_type=authorization_code` troca o código pelo par de tokens, conferindo o PKCE (`code_verifier`) e a `redirect_uri`. `grant_type=refresh_token` renova e **gira** o refresh token: reapresentar um já usado revoga a conexão inteira. Access token de 1 hora, refresh de 30 dias, ambos opacos e presos à conexão (membro + comunidade). Aceita `application/x-www-form-urlencoded` ou JSON. Limite de 60 por minuto por IP. Público.

Request-Body application/x-www-form-urlencoded

NameTypBeschreibung
grant_typePflichtauthorization_code | refresh_token
client_idPflichtstring
client_secretoptionalstring
codeoptionalstring
redirect_urioptionalstring
code_verifieroptionalstring
refresh_tokenoptionalstring
resourceoptionalstring

Antworten

StatusBeschreibung
200`{ access_token, token_type: Bearer, expires_in, refresh_token, scope }`.
400`{ error, error_description }` — `invalid_grant`, `invalid_request`, `unsupported_grant_type`.
401`invalid_client`.

curl-Beispiel

curl -X POST "https://api.memberfy.net/oauth/token" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"grant_type":"authorization_code","client_id":"string"}'