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/
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.
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.
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', };
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.
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.
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()); }
Please note: The use of the Majestic site or a Majestic Subscription is subject to these terms and conditions.