I heard back from the developer of the API. Somehow my IP address had gotten blacklisted. He removed that and everything works. So, nothing wrong with the code.