Authentication
Last updated
Was this helpful?
Last updated
Was this helpful?
The SMTP API uses JWT bearer tokens to authenticate requests. You can view and manage your API keys via the .
Your JWT bearer tokens carry many privileges, so be sure to keep them secure! Do not share your tokens via publicly accessible areas such as GitHub, client-side code, and so forth.
Authentication to the API is performed via . Provide your API key as the basic auth username value. You do not need to provide a password.
If you need to authenticate via bearer auth (e.g., for a cross-origin request), use -H "Authorization: Bearer RPqH8iq9xHd7ayjQc2Qkg4j>jv/HUdWH"
instead of -u RPqH8iq9xHd7ayjQc2Qkg4j>jv/HUdWH
.
POST
https://api.smtpd.dev/oauth/token?grant_type=password
This endpoint allows you to login and retrieve your JWT access token & refresh token.
Authorization
string
Basic: Base64(username:password) OR Base64(key:secret)
POST
https://api.smtpd.dev/oauth/token?grant_type=refresh_token
This endpoint allows you refresh your access token.
refresh_token
string
Refresh Token
POST
https://api.smtpd.dev/oauth/revoke
Authentication
string
Bearer {access_token}
refresh_token
string
Refresh Token to be revoked
GET
https://api.smtpd.dev/oauth/me
This endpoint returns the logged in users details.
Authentication
string
Bearer {access_token}