Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

Restricted feauture

Activation via API is an advanced feature that is disabled by default for standard integrations. You have to ask MailUp authorization to have it enabled on your application.

 

Problem

Applications that integrate with MailUp may need to request new MailUp trial accounts if the user of the application is not yet a MailUp user.

Solution

You can build the ability to activate a new MailUp trial 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.

 

Workflow
  1. The external application requests account activation using TrialActivation method and specifying an email address that has already been confirmed (i.e. there is no need of an additional email that confirms that email address is valid)
  2. Activation starts and 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:
    1. 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.
    2. Value = 5 or 7 => ”The trial activation is in progress, you’ll receive the account credential soon.”
  3. When activation is completed you’ll receive MailUp account credentials in your inbox and, at the same time,  TrialActivationStatus returns 2.
  4. 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

 

IMPORTANT

Access to the resources (lists, messages, subscribers) of newly activated account requires an authentication and authorization process that is different than what is working for "trial activation methods": it needs OAuth2 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 refresh token to access to MailUp resources.

 

Getting Started

How to activate a trial console

{
	"Company":"String content",
	"Email":"String content",
	"IpAddress":"String content",
	"IsUSA":true,
	"Language":"String content",
	"NameAndSurname":"String content",
	"PhoneNumber":"String content",
	"Referer":"String content",
	"RegisterToNewsletter":true,
	"UserAgent":"String content"
}
    1. Passed in 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)
    2. Arguments and their meaning can be explained as follows :

 

Optional

Name

Type

Meaning

false

NameAndSurname

String

Applicant first and family names

false

Company

String

Business Name

false

Email

String

Email address who will be sent of the confirmation request and access information

false

PhoneNumber

String

Applicant phone number

false

Language

String

console language, please use one of the following : EN, ES or IT ( English, Spanish or Italian)
false

IpAddress

StringIP address of the client that performs the request

false

IsUSA

Boolean

Cost centre, put False for activations from the Euro zone, else put True

false

RegisterToNewsletter

Boolean

True if the applicant is intended to receive Mailup Newsletters
trueRefererStringHostname of the machine that performs the request
trueUserAgentStringInformation about the browser that is used to perform the request

 

    • Method callback must be enclosing the API KEY in the header as stated in this page (Please see "Resource Access Requirements")
      [Authorization] = "Basic " + Base64(ClientId + ":" + ClientSecret)
    • Callback response returns an Identity (ID) that can be used to track activation status with a further callback to the following https://services.mailup.com/API/v1.1/Rest/PublicService.svc/Console/TrialActivationStatus. (TrialActivationStatus)
    • Returned codes from TrialActivationStatus are:

      1 – Confirmed (Request has been accepted, activation is ready to start)
      2 – Processed (Your trial has been activated and you’ll receive the account credentials in your inbox)
      3 – Error (An error occurred and an alert has been notified to our support team in order to solve this issue) 
      4 – Manual (MailUp platform is in maintenance mode, your request will be processed as soon as the platform will be restored)
      5 – In progress (The trial activation is in progress, soon you’ll receive the account credentials)
      6 – Blocked (An error occurred and an alert has been notified to our support team in order to solve this issue) 
      7 – Re elaborated (The trial activation is in progress, soon you’ll receive the account credentials)
    • Any activation request can be performed with a single call to TrialActivation  and further callbacks looping on TrialActivationStatus until it returns ID=2


No more than one trial activation is allowed from the same caller IP. In order to facilitate 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 actually create a new account and it returns "-1" as activation request code. In addition, in case of "fake activation", a random value1 is returned when calling TrialActivationStatus

(1) returned values have 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"

 

Relevant notes

    • Automated consoles’ activations require a couple of minutes at least to complete. 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 there’s no API method in charge to.
    • Currently there’s no implemented functionality in the MailUp API set to retrieve the list of activated consoles from a certain application. This ability is planned to be implemented in the near future.


  • No labels