This guide will walk you through how to set up an API ID/Key Pair.
In order to interact with the RWS/REST API. You need to have a "consumer key" and "consumer secret" pair, just like Amazon Web Service.
Creating Application
-
Log in to your MaxCDN Control Panel.
-
Select Account in the main navigation menu area.
-
Select API
-
Select Create Application
- In the Register application page, enter a name to identify your application and a short description for it.
- The Application URL and Callback URL are optional. You only need them if the application is interacting between your website and our RWS server, so in the majority of cases, this can be left blank. If it's a simple app to send or receive information, then it safe to leave those two fields empty.
- Click Register Application.
-
Your consumer key and secret will be available on the next page.
Application Already Created
- Login to your CDN Control Panel.
- Select Account in the main navigation menu area.
- Select API
- On the list of registered applications click the Manage button next to the application you wish to use.
- Your Consumer Key and Secret will be available on the next page.
Different Use Cases
-
WordPress W3 Total Cache plugin
In order for you to use newly generated API key pair within W3 Total Cache (W3TC) plugin, you can either use the existing button in W3TC called "Authorize" it will generate the API key for you and construct it automatically so you can just copy-paste it in W3TC provided field. Also, if you want to do it manually, this is the general form based on which your key will be constructed:
alias+consumer_key+consumer_secret
-
Custom Application
Many different approaches with custom applications that use our API are all relying to same registering process of API key pair:
api = MaxCDN("alias", "consumer_key", "consumer_secret")
@here "MaxCDN" is a class name you are loading from appropriate library (if older library is used it may be called "NetDNA" or "NetDNARWS"). For more details on custom API usage visit our API documentation page.
As always, If you have any questions or concerns about any of the topics mentioned in this article, please feel free to reach out to support - we are available 24/7 by chat or email