google-ads-node
google-ads-node copied to clipboard
How to authorize UserDataServiceClient
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