Zum Inhalt springen

Einen Autorisierungscode eintauschen, eine Sitzung erneuern oder einen vertraulichen Client authentifizieren

POST
/v1/oauth/token
curl --request POST \
--url https://api.vimine.network/v1/oauth/token \
--header 'Content-Type: application/json' \
--data '{ "grant_type": "authorization_code", "client_id": "example", "client_secret": "example", "code": "example", "code_verifier": "example", "redirect_uri": "https://example.com", "refresh_token": "example", "scope": "example" }'

Der Token-Endpunkt von OAuth 2.1. grant_type=authorization_code (+ PKCE S256, aus „Mit Vimine anmelden“), refresh_token (rotierend; eine Wiederverwendung widerruft die Familie), client_credentials (vertrauliche Clients, HTTP Basic oder Body). Die Fehler folgen RFC 6749.

Medientypapplication/json
object
grant_type
erforderlich
string
Erlaubte Werte: authorization_code refresh_token client_credentials
client_id
string
client_secret
string
code
string
code_verifier
string
redirect_uri
string Format: uri
refresh_token
string
scope
string

Token-Antwort

Medientypapplication/json
object
access_token
string
token_type
string
expires_in
integer
refresh_token
string
scope
string
sub
string
Beispielerzeugt
{
"access_token": "example",
"token_type": "example",
"expires_in": 1,
"refresh_token": "example",
"scope": "example",
"sub": "example"
}

Ungültige Anfrage

Medientypapplication/problem+json
object
type
erforderlich
string Format: uri
title
erforderlich
string
status
erforderlich
integer
detail
string
code
erforderlich
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
Beispielerzeugt
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

Nicht gefunden

Medientypapplication/problem+json
object
type
erforderlich
string Format: uri
title
erforderlich
string
status
erforderlich
integer
detail
string
code
erforderlich
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
Beispielerzeugt
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

Ratenlimit überschritten

Medientypapplication/problem+json
object
type
erforderlich
string Format: uri
title
erforderlich
string
status
erforderlich
integer
detail
string
code
erforderlich
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
Beispielerzeugt
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

Interner Fehler

Medientypapplication/problem+json
object
type
erforderlich
string Format: uri
title
erforderlich
string
status
erforderlich
integer
detail
string
code
erforderlich
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
Beispielerzeugt
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}