Skip to content

How to authorize UserDataServiceClient #96

Description

@samdoeswork

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions