Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Client application registration: developers need to perform this step within the MailUp Dev portal* in order to receive the application credentials (client_id and client_secret). Without these credentials the application will not be recognized by the authorization server and it won't be able to access the system. We recommend that the client credentials should be saved in a safe way (e.g. inside the application code) in order to prevent any changes. The developer is in charge of keeping them secret and safe.
  2. Authorization: the client application requests the user an authorization by sending its private credentials to the authorization server. The authorization server authenticates the client application and redirects the user to a private page. If the login is successful, the user is asked to confirm the authorization to the application. After the confirmation, the server will provide an provides an authorization code to the client application.This authorization code has limited duration: it should not be saved and should be immediately used to request an access code via an authorization server.
  3. Impersonation: the client application requests an access token by sending client credentials and authorization code to the authorization server. If the provided data are valid, the server returns the access credentials (access_token, refresh_token and expiration timespan) to be used for resource requests. Access credentials should be stored for future use.

As the token has limited duration, it should be refreshed from time to time. This is possible by requesting the authorization server to refresh tokens providing to it : the two parameters that you need to provide are the client credentials and the previously obtained refresh token. Different There are the different ways in which the client could recognize detect the necessity need to refresh the access token so : it's up to the developer how to proceedchoosing one of them.

Basically, the application should check for periodically the access token expiration expiry time, or intercept the http status codes and handle them in a convenient mannerconveniently.

 

*Please contact MailUp support if the MailUp Dev portal is not accessible.