Get the value of an OAuth2 access token

Describe the issue/error/question

I’m developing a Google Ads node and the documentation recommends using libraries instead of http1. There isn’t an official library for javascript but there is a nice open source project wich covers that:

I’ve implemented some endpoints but for now I need to add the refresh token manually to create a “customer” object and use it to call methods.

My question is how can I get the refresh token’s value using the OAuth2 credentials? Usually it is added automatically with:

return await

Hey @valya,

I am not sure if this will change what you are doing but we are already creating a node for Google Ads which may save you some time and effort.

1 Like

Hi @jon !

Thank you for the quick response! The node looks great!
The functionality I need to implement is:

  • add/remove contact from a user list
  • create a user list
  • get a user list
  • search user lists

What would be your advice?
Can I help you in any way with the node?
And do you think Opeto’s library would improve the development?

Hey @valya,

I think using the library could make things easier but where possible we don’t tend to add extra third party libraries so prefer using standard HTTP calls it also means if there is a bug we don’t need to wait for the library to make a change.

It looks like our node doesn’t have the user list option but what you could do is pop in a pull request for that node once completed to add in the user list side you are after or maybe fork the branch and work from that?

Hey @jon ,

I will work on adding user lists to the project without using the library. Already cloned the fork and managed to add some operations :slight_smile:

What I’m not sure about is should I move my work in a fork of n8n or should I fork the fork?

Once again thank you for the quick reaction!

Hey @valya,

That is a lot of forks :joy:, I would fork n8n and use that but I guess it all comes down to your preferred workflow.

Okay :slight_smile:
Last question, do you know which folder structure should I use? Like the new branch in n8n or like
the branch in the fork?

I would use the one from the fork as it uses the newer versioning approach.

@ago’ is already working in the Google Ads node