# Writing a request for node-red-contrib-google-oauth2

**URL:** <https://discourse.nodered.org/t/writing-a-request-for-node-red-contrib-google-oauth2/36523>\
**Category:** Developing Nodes\
**Created:** [25 November 2020 19:21 UTC](https://discourse.nodered.org/t/writing-a-request-for-node-red-contrib-google-oauth2/36523 "2020-11-25T19:21:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jitrah](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@jitrah](https://discourse.nodered.org/u/jitrah)\
**Post date:** [25 November 2020 19:21 UTC](https://discourse.nodered.org/t/writing-a-request-for-node-red-contrib-google-oauth2/36523/1 "2020-11-25T19:21:10Z")

</div>

Hi,

I'd like to use the node-red-contrib-google-oauth2 node to get Google analytics session from my GA account. I've associated the right credentials to the node and I'm authenticated successfully.

 ![Screen Shot 2020-11-25 at 11.15.22 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/f/af04f73614ea479e106406a136a0efdf8c869c94.png)

I'm trying to write a request to batchGet _"ga:sessions"_ for specific _"dateRanges"_ in a function node placed before the node-red-contrib-google-oauth node.

![Screen Shot 2020-11-25 at 11.18.40 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/1/c1e85d64145546e6d060bc3e729e83427af73b77.png)

However, I'm having difficulties passing over the request body to the GA node in order to get what I need (I can do it from my console no pb). I'm new at node-red and would love some guidance on how to build this flow.

Anyone has done this before?

Thank you,  
JB

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [24 January 2021 19:21 UTC](https://discourse.nodered.org/t/writing-a-request-for-node-red-contrib-google-oauth2/36523/2 "2021-01-24T19:21:23Z")

</div>

Closed on 24 January 2021 19:21 UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
