# Google Oauth2 Config

**URL:** <https://discourse.nodered.org/t/google-oauth2-config/13798>\
**Category:** General\
**Created:** [29 July 2019 16:43 UTC](https://discourse.nodered.org/t/google-oauth2-config/13798 "2019-07-29T16:43:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![danleighton](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/danleighton/32/7711_2.png) [@danleighton](https://discourse.nodered.org/u/danleighton)\
**Post date:** [29 July 2019 16:43 UTC](https://discourse.nodered.org/t/google-oauth2-config/13798/1 "2019-07-29T16:43:31Z")

</div>

I am currently trying to configure the discovery api using the [https://github.com/pckhib/node-red-contrib-google-oauth2](https://github.com/pckhib/node-red-contrib-google-oauth2) node.

Everything is working just fine, until I try to use the Dynamic (msg.operation) functionality. I am trying to work out how to configure it correctly to pass the methods to the node:

List, which is this:  
`GET https://www.googleapis.com/discovery/v1/apis`

And getRest, which ends up like this:  
`GET https://www.googleapis.com/discovery/v1/apis/drive/v2/rest`

From the documentation, it is unclear whether I need to pass the operation parameter into msg.google.operation or msg.operation. But I think it is msg.operation. An even if it is msg.operation, I can't seem to get it to work...

I thought perhaps it should simply be passing a string, so tried this in a function with no luck...

```auto
msg.operation ="apis";
};
return msg;

```

Also tried many other variants...

The main error that is being returned is:

`TypeError: operation is not a function` which presumably means that the node is not correctly receiving the methods in the way in which it expects.

Any clues would be gratefully received.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [30 July 2019 09:46 UTC](https://discourse.nodered.org/t/google-oauth2-config/13798/2 "2019-07-30T09:46:27Z")

</div>

sounds like it's time to open an issue on the nodes GitHub page...

---

<div class="post-metadata">

**Author:** ![danleighton](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/danleighton/32/7711_2.png) [@danleighton](https://discourse.nodered.org/u/danleighton)\
**Post date:** [30 July 2019 09:57 UTC](https://discourse.nodered.org/t/google-oauth2-config/13798/3 "2019-07-30T09:57:19Z")

</div>

Already done...

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [30 July 2019 10:02 UTC](https://discourse.nodered.org/t/google-oauth2-config/13798/4 "2019-07-30T10:02:10Z")

</div>

Are you sure? [https://github.com/pckhib/node-red-contrib-google-oauth2/issues](https://github.com/pckhib/node-red-contrib-google-oauth2/issues)

---

<div class="post-metadata">

**Author:** ![danleighton](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/danleighton/32/7711_2.png) [@danleighton](https://discourse.nodered.org/u/danleighton)\
**Post date:** [30 July 2019 10:14 UTC](https://discourse.nodered.org/t/google-oauth2-config/13798/5 "2019-07-30T10:14:55Z")

</div>

Yup. Very sure. It is on the pre-forked repo.

The author of the forked repo I linked to only opened the ability to add issues this morning. I shall add an issue there as well now and link the two together as dupes of the same problem.

---

<div class="post-metadata">

**Author:** ![SSSangha90](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sssangha90/32/14247_2.png) [@SSSangha90](https://discourse.nodered.org/u/SSSangha90)\
**Post date:** [17 October 2019 12:48 UTC](https://discourse.nodered.org/t/google-oauth2-config/13798/6 "2019-10-17T12:48:46Z")

</div>

Any luck with this?

Thanks

---

<div class="post-metadata">

**Author:** ![danleighton](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/danleighton/32/7711_2.png) [@danleighton](https://discourse.nodered.org/u/danleighton)\
**Post date:** [12 November 2019 17:32 UTC](https://discourse.nodered.org/t/google-oauth2-config/13798/7 "2019-11-12T17:32:43Z")

</div>

Ah! Sorry for slow response. Yes and no.

I did manage to fix it with some help. But the code had a bug so we had to fork it and fix it. Will need to find the code and see if we can't get it released.
