Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to authorize UserDataServiceClient #96

Open
samdoeswork opened this issue Mar 15, 2022 · 0 comments
Open

How to authorize UserDataServiceClient #96

samdoeswork opened this issue Mar 15, 2022 · 0 comments

Comments

@samdoeswork
Copy link

Hi,
Thank you for building these libraries!

I've successfully been using the companion google-ads-api library but I can't see how to add developerToken / authorize the services in this library. Specifically I need to run UserDataServiceClient.

Here is my code sample & I think/hope it should work if I can just authorize it correctly. (The google-ads-api constructor takes clientId, clientSecret, and developerToken & then Customer adds a refreshToken - I can't work out how to specify the developer_token).

const client = new UserDataServiceClient(
{
clientOptions: {
clientId: ADS_CLIENT,
clientSecret: ADS_SECRET,
refreshToken
}
}
)
const result = await client.uploadUserData({
customer_id: googleAdAccount,
operations: [
{
create: new common.UserData({
user_identifiers
}),
}
],
customer_match_user_list_metadata: {
user_list: googleAudience,
}
})

Hope this makes sense.

Again - thank you for making this awesome library.

Regards
Sam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant