GET/token

Get a new admin access token

Authenticates an admin using HTTP Basic Auth and returns a JWT access token with its expiration. Use this token in the Authorization header as "Bearer " for subsequent API calls

1 parameter
X-SFTPGO-OTPstringoptional
If you have 2FA configured for the admin attempting to log in you need to set the authentication code using this header parameter

5 status codes
200successful operation
access_tokenstringoptional
expires_atstringoptional
401Unauthorized
errorstringoptional
error description if any
messagestringoptional
message, can be empty
403Forbidden
errorstringoptional
error description if any
messagestringoptional
message, can be empty
500Internal Server Error
errorstringoptional
error description if any
messagestringoptional
message, can be empty
defaultUnexpected Error
errorstringoptional
error description if any
messagestringoptional
message, can be empty

Error handling

A 401 is returned: Unauthorized. A 403 is returned: Forbidden. A 500 is returned: Internal Server Error. Any other status is an error: Unexpected Error.