When it comes time to connect to APIs, I find that it is a lot easier to test them using a REST client before you start writing any code. Using a REST client allows for you to make sure that you are able to connect to it successfully, and it allows for you to try out different parameters of the API.
One of the best tools that I was introduced to is, the Firefox RESTClient Plugin. This plugin is very easy to use, and it allows for you to save your request for quick reference.
This article discusses how you can use the RESTClient connect to an API and it goes through the different settings. To read the article, click here: https://connect.liveperson.com/content/troubleshooting-apis
I hope you enjoyed this post. If you have any questions or comments, please feel free to post them below.