Why am I getting SSL certificate errors when using the API?