google-ads-api
google-ads-api copied to clipboard
How to Pass LoggedIn userID in Customer of google-ads-api
Hi Team!
I want to clear my point a bit more as to what I actually have to do. So, basically:
- I have a React Web App and I have integrated a Google Auth SDK
- When user will login, user session including user id named as "Sub" will be generated and also refreshToken
- Now I have to send "sub" and "refresh_token" to the backend and pass them to:
const { GoogleAdsApi, enums } = require("google-ads-api");
const client = new GoogleAdsApi({ client_id: ${client_id}, client_secret: ${client_secret}, developer_token: ${developer_token_from_googleAdsManagerAccount}, }); const customer = client.Customer({ customer_account_id: id, refresh_token: refresh_token, });
- But I don't know which id will identify the loggedIn user. And where I have to pass that "sub" id of the user to Customer?