Erhalten eines Benutzertokens
/v1/auth/tokenStellt 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
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
loginUnbedingtstringpasswordUnbedingtstringminLength: 1maxLength: 128modestringGültige Werte:
"account""mailbox"Standard:
"account"
Unbekannte Felder werden nicht akzeptiert.
Antworten
200 Erfolgreiche Antwort
application/json
object
access_tokenstringtoken_typestring"Bearer"expires_ininteger3600mailbox_id- Option 1
integerOption 2null
401 Anmeldung erforderlich
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray-Elementeobject
403 Kein Zugriff
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray-Elementeobject
404 Ressource nicht gefunden
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray-Elementeobject
409 Staatskonflikt
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray-Elementeobject
422 Validierungsfehler
application/json
object
detailarrayArray-ElementeobjectlocUnbedingtarrayArray-ElementeOption 1stringOption 2integermsgUnbedingtstringtypeUnbedingtstring
429 Zu viele Anfragen
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray-Elementeobject
503 Vorübergehende Nichtverfügbarkeit
application/json
object
detail- Option 1
stringOption 2objectcodestringmessagestring
Option 3arrayArray-Elementeobject