OpenApps

OpenApps is a way to connect a Majestic subscription to third party applications. Making your applications available to Majestic users through OpenApps is as easy as registering your application with us and then receiving a unique authentication URL that users can use to connect their accounts to your application with one click. Majestic subscribers with any level of paid subscription are able to connect to OpenApps applications. The embedded video below demonstrates how to create applications using OpenApps and link user accounts to your new applications.

To create an OpenApps application, you'll need API access. API access is included in Platinum (Legacy) and API plans. If you're not a current subscriber at this level please purchase a subscription to an API plan here or contact us to discuss alternatives. Developers are responsible for providing support for their applications.

A possible starting point for developers is our example OpenApp, available at http://openapp-example.majesticseo.com/

How To Create an OpenApps Application

Registering your application

  1. Log in to your Majestic account.
  2. Majestic OpenApps tab
  3. Go to your account details and select the OpenApps tab.

  4. Majestic OpenApps tab
  5. Confirm your registration by completing the form. You'll need to provide the name of the application, the name of the publisher and a public support page then agree to the terms and conditions. This option will not be visible if you do not currently have API access.

  6. Majestic OpenApps registration
  7. Your application has now been approved.

  8. Majestic OpenApps acceptance

Connecting your account

The instructions that follow will allow you to connect your account to your newly created application and will mirror the process your users will follow to connect their accounts to your finished application.

  1. Refresh your OpenApps page and then copy and paste the provided link into your browser to link your account with your newly registered application. This will be the same public URL you will need to provide to the users of your application to link their account resources to the application.
  2. Public URL to be shared with Majestic OpenApps users
  3. Confirm that you would like this application to have access to your account. Your users will link their accounts to your application in the same way, by following the provided link to this confirmation page.

  4. Majestic OpenApps authorisation
  5. Once you grant an application access, a unique access token is generated.

  6. Unique Majestic OpenApps access token
  7. You are now free to develop your application using these commands.

Please note that the access token you have just generated will be linked to your account and will therefore consume your resources. Users will have to provide their own authentication token to use their account's resources.

Authenticating OpenApp requests

Authenticating OpenApp requests through a HTTP request

OpenApp requests can be made via a HTTP request with the parameters in the following format:

{
  'accesstoken': "User's OpenApp authentication token",
  'privatekey': "Token identifying the specific OpenApp using resources"
  'Timeout': 'Timeout period between executions',
  'cmd': 'Command to be executed',
  'Command_specific_parameters': 'Any parameters unique to the command',
};

Finding accesstoken

Access tokens are generated for OpenApps application when a user clicks on a URL to give permission to a given OpenApp. An example access token can be found in Step 2 of connecting your account.

Finding privatekeys

Private keys are unique identifiers for OpenApps. These are paired with access tokens, but hidden from the end users. When a call to the API is made, the access token and private key provided will be compared to check if they are both valid.

  1. Go to your account details and select the OpenApps tab.

  2. OpenApps section in the account menu
  3. Click on the application name.

  4. Finding an OpenApp in the OpenApps section
  5. Your private key will be on that page.

  6. Finding the private key for an OpenApp

Authenticating OpenApp requests through a connector

When making an OpenApps call to the API through a connector, you will need to use the executeOpenAppRequest method. This method takes the command name, a set of command parameters and the user's access token, returning a response. An example Java application which uses this method is below.

APIService api = new APIService("MY_API_KEY", "https://api.majestic.com/api_command");

Map<String, String> parameters = new HashMap();
parameters.put("items", "1");
parameters.put("item0", "majestic.com");

Response response = api.executeOpenAppRequest("GetIndexItemInfo", parameters, "OPENAPP_PRIVATE_KEY");

if(response.isOK()){
	DataTable dataTable = response.getTableForName("Results");
	List<Map<String, String>> rows = dataTable.getTableRows();
	Map<String, String> result = rows.get(0);

	System.out.println(result.get("ExtBackLinks"));
}
else{
	System.out.println(response.getErrorMessage());
}

Troubleshooting and Common Issues

Please note: The use of the Majestic site or a Majestic Subscription is subject to these terms and conditions.