Zum Inhalt springen
Deutsch

Erhalten eines Benutzertokens

POST/v1/auth/token

Stellt basierend auf Login und Passwort ein Zugriffstoken für eine Stunde aus. Geben Sie mode=account an, um auf alle Kontopostfächer zuzugreifen, oder mode=mailbox, um auf eine Adresse zuzugreifen. Übergeben Sie access_token im Header Authorization: Bearer <access_token>.

Berechtigungs- und Zugangsbereiche · Fehler und Wiederholungen

Anfrage

Terminal-Fenster
curl -X POST 'https://adapt-mail.com/v1/auth/token' \
-H 'Content-Type: application/json' \
--data '{"login":"user-123","password":"<password>"}'

Anforderungstext · application/json

object

loginUnbedingt

string

passwordUnbedingt

string

minLength: 1

maxLength: 128

mode

string

Gültige Werte: "account" "mailbox"

Standard: "account"

Unbekannte Felder werden nicht akzeptiert.

Antworten

200 Erfolgreiche Antwort

application/json

object

access_token

string

token_type

string

"Bearer"

expires_in

integer

3600

mailbox_id
Option 1

integer

Option 2

null

401 Anmeldung erforderlich

application/json

object

detail
Option 1

string

Option 2

object

code

string

message

string

Option 3

array

Array-Elemente

object

403 Kein Zugriff

application/json

object

detail
Option 1

string

Option 2

object

code

string

message

string

Option 3

array

Array-Elemente

object

404 Ressource nicht gefunden

application/json

object

detail
Option 1

string

Option 2

object

code

string

message

string

Option 3

array

Array-Elemente

object

409 Staatskonflikt

application/json

object

detail
Option 1

string

Option 2

object

code

string

message

string

Option 3

array

Array-Elemente

object

422 Validierungsfehler

application/json

object

detail

array

Array-Elemente

object

locUnbedingt

array

Array-Elemente
Option 1

string

Option 2

integer

msgUnbedingt

string

typeUnbedingt

string

429 Zu viele Anfragen

application/json

object

detail
Option 1

string

Option 2

object

code

string

message

string

Option 3

array

Array-Elemente

object

503 Vorübergehende Nichtverfügbarkeit

application/json

object

detail
Option 1

string

Option 2

object

code

string

message

string

Option 3

array

Array-Elemente

object