#Below 2 lines are to bypass the SSL verification which was also causing authentication issues. $client->getUseragent()->ssl_opts(verify_hostname => 0); $client->getUseragent()->ssl_opts(SSL_verify_mode => SSL_verify_NONE);