If you're connecting to a remote host then please make sure your API is SSL certificates are correctly verified.