Firestore Connexion

Hello All,

I am trying to connect post with my firestore collections
If I am doing it with 2 request (first get a token and then copy/past the token in the second request it is working)
But When I want to do it with 1 request I cannot figure out how to place parameters.

Can you please help me on this.

Hi! Can you elaborate more on what you are trying to achieve?
It sounds like you are trying to use a token received from first request in the second request, however, I am not completely sure what you mean by “I want to do it with 1 request”.
Looking forward to hearing back from you!

hello and thanks for your answer.

If I understood correctly postman I can :
get my data using my API and in the authorization tab put Oauth2.
In the configuration I am configuring how to get a new token that will be used in the get resquest.

I manage to do a first request POST where I have a token and then copy manually the token. Go to my other request (GET) and paste manually my token in the field ACCESS TOKEN.
I would like to understand how to fill the fileds in the “get new token” in order to manage in the “call”.
Unfortunatly I do not see where and what data to enter for my firebase environnement.

If I understand it correctly, the workflow you want to achieve is:

  1. First POST request that returns access token
  2. Save the access token in 1 as an environmental variable
  3. Use the environmental variable in the next GET request

If that’s what you want to achieve, you can use Tests script where you can set environmental variable. e.g.

pm.environment.set(‘accessToken’, accessToken)

If you would like to know more about scripting, here is the reference:

I hope this helps.
Please feel free to reach out fi you have more questions!

thanks for your answer. I will try that

Excellent! Let me know how it goes :slightly_smiling_face: