Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase REST API INVALID_ARGUMENT on refresh-token

Yesterday we started to have problems with the REST API in particular with the refresh token method: https://firebase.google.com/docs/reference/rest/auth/#section-refresh-token

curl 'https://securetoken.googleapis.com/v1/token?key=[API_KEY]' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data 'grant_type=refresh_token&refresh_token=[REFRESH_TOKEN]'

We tried this call using the curl example on the documentation and with our own development (with PHP and Guzzle) and we always get this error:

"error": {
        "code": 400,
        "message": "Request contains an invalid argument.",
        "status": "INVALID_ARGUMENT"
    }
like image 339
Rafael Sellés Pingvalue Avatar asked Jun 15 '18 12:06

Rafael Sellés Pingvalue


Video Answer


1 Answers

It looks like this happens when you make that call from inside Google's datacentres, it works fine for us locally. It started happening to us too on the 14th. I've raised a bug with the firebase team.

like image 180
Ricky26 Avatar answered Sep 27 '22 21:09

Ricky26