One of the most painful parts of integrating any new API is simply figuring it out – what API calls require what parameters, and what data is returned. Usually the process involves poring over the API documentation, and putting together test API calls, then finding a framework to make the calls and observe the results. Many times, setting up the test framework is a significant amount of work – time you could better spend learning what the API can do and discovering how it can help you.
To simplify this process, and to make the Mogreet mobile APIs even easier to learn and work with, we present the Mogreet API tester! The API tester, located in your developer dashboard, is a handy way to learn about the API calls available, discover what parameters are required and optional, experiment with alternatives and quickly make the calls and see the result.
Log into your developer dashboard now at https://developer.mogreet.com/dashboard/main and head to the test page at https://developer.mogreet.com/dashboard/test to check it out with me. The Menu item for the Tester is labeled API Tester, and is on the left hand navigation bar of the Mogreet Developer Dashboard.
It’s dead simple to use. Just click on the drop menu at the top of the page to view all the API calls available to you. They are grouped by functionality: Test System, Messaging, Media Management and Transcoding, List Management, Keyword management and User Info.
Let’s start with a simple test api call. When you choose ‘check credentials’, the API tester shows a handy description of the API call and a series of fields showing the parameters of the API call. In the case there are only two required parameters to the API call, your client_id and token, and these are included in the call by default. All you need to do is choose between JSON and XML for the return data format. Easy!
As you make choices in the API tester, the API call itself changes, and the code to make it is shown in plain text as an HTTPS GET request (you can also use HTTPS POST).
When you are ready to fire off the call, click the ‘Make the Call!’ button, and the result will be displayed to you in the API Response area of the tool.
You can also copy the text of the API call and paste it into another framework for testing. The simplest way is to use curl like this:
When you choose an API call from the drop down list of available call choices, all of the required and optional parameters will be displayed in the API builder. As you mouse over each one, a simple description will appear in a pop up bubble. This makes it easy to explore the available API calls, see what parameters are available, and learn more about what those parameters do.
Choose several calls from the drop list to learn more about the possibilities – you’ll find a complete set of APIs for sending and receiving SMS and MMS messages across carriers, for uploading, transcoding and consuming video and/or any other media on mobile devices, and much more.
If you are building with the Mogreet API, let us know! We would love to spotlight your build on our website and blog.
Anthony Rossano, CTO, Mogreet