I have created a Cloud Firestore database, with a collection and some documents. I want to make some requests to it with Postman, but I am not able to authenticate. I have created a service credentials and tried to get the token for the authentication, with no success. Any idea about how to get it?
Which is the endpoint to get the token?
Thanks in advance.
Assuming you are trying to use Firestore REST API you can obtain token with the following steps:
gcloud auth activate-service-account --key-file=<path_to_json>
gcloud auth print-access-token
Authorization
header with value Bearer <copied_token>
to your request or add it as a request parameter to url with ?access_token=<copied_token>
Keep in mind that these tokens are short-lived and are valid maximum for an hour.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With