Applications that integrate with MailUp may wish to request new MailUp accounts if the user of the application is not yet a MailUp user.
Account activation via API is an advanced feature that is disabled by default. It requires manual activation by the MailUp team. Please contact MailUp to have this feature enabled for your application. You will be asked to provide your Client ID
You can build the ability to activate a new MailUp account right into your application by using the MailUp public API endpoint. Below you can find the expected workflow and the technical details for implementing it. An example of an application using the MailUp account provisioning API is the APS package. Below we describe how to activate a free trial account, but the same methods can be used - upon request - to provide custom setups (ie Whitelabel platform with custom features enabled).
- The external application requests account activation using the TrialActivation method and specifying an email address that has already been confirmed (i.e. there is no need for an additional email that confirms that the email address is valid)
- Activation starts and the TrialActivationStatus method can be used to get activation status. When activation is in progress, TrialActivationStatus returns a value that is different than 2. While status is different than 2 the external application is not yet able to connect to the console account, the following strings could be displayed:
- Value = 3,4 or 6 => “An error happened, the activation will be managed directly by MailUp support”. This result rarely happened during maintenance activities, in which processing was suspended for about 2 hours and then restarted.
- Value = 5 or 7 => ”The trial activation is in progress, you’ll receive the account credential soon.”
- When activation is completed you’ll receive MailUp account credentials in your inbox and, at the same time, TrialActivationStatus returns 2.
- At this point, the MailUp account is available, and received credentials can be inserted into the external application to perform authentication on the newly activated account
Different authentication & authorization
Access to the resources (lists, messages, subscribers) of the newly activated account requires an authentication and authorization process that is different than the one used for the trial account activation methods: specifically, it requires OAuth2 authentication with a token that has to be periodically refreshed when HTTP 401 error is returned. Please refer to "Samples and Wrappers" if you need a working example of an application that properly uses the refresh token to access to MailUp resources. See more information about /wiki/spaces/mailupapi/pages/36340656.
- Register your application to get your API keys (link).
- Contact MailUp Support and ask for enabling your application to use the account provisioning feature.
- Your request will be reviewed and, in case of success, your application will be authorized to create new MailUp trial accounts
How to activate a trial account
- Arguments can be sent as XML or JSON according to the user-defined value set in the header (http://help.mailup.com/display/mailupapi/Resource+access+data+format)
- Arguments and their meaning can be explained as follows :
|The applicant first and family names|
|Email address who will be sent of the confirmation request and access information|
|Applicant phone number|
console language, please use one of the following:
- EN (English)
- IT (Italian)
- ES (Spanish)
- FR (French)
- PT (Portuguese)
- JA (Japanese)
- DA (Danish)
|String||The IP address of the client that performs the request|
|Cost center put False for activations from the Eurozone, else put True|
|True if the applicant is intended to receive Mailup Newsletters|
|true||Referer||String||The hostname of the machine that performs the request|
|true||UserAgent||String||Information about the browser that is used to perform the request|
No more than one trial activation is allowed from the same caller IP. To support the development and to avoid the creation of unused accounts, developers can take advantage of the "fake activation" feature, which can be used when IpAddress = 127.0.0.1 or when IpAddress starts with "192.168.". "Fake activation" does not create a new account and it returns "-1" as activation request code. In addition, in the case of "fake activation", a random value1 is returned when calling TrialActivationStatus
(1) returned values have a range that spans from 1 to 7 and they can be used to simulate real cases. Due to an API limitation, also "0 - Not Confirmed" may be returned in case of fake activation, please manage this case exactly as "1 - Confirmed"
- Creating a new account may take up to a couple of minutes. When completed, the activation process will take care of sending activation confirmation message and login credentials to the applicant’s defined email address
- Login credentials can be only transmitted by email as no API method can return those values.
- Currently, there’s no way to retrieve the list of the accounts activated by a certain application.