Getting Google::Apis::AuthorizationError: Unauthorized when I try to delete a sub-account (but creating them works)

43 views
Skip to first unread message

doug livesey

unread,
Jan 31, 2018, 12:19:53 PM1/31/18
to AdWords API Forum
Hi -- I'm using the `Google::Apis::ContentV2::ShoppingContentService` (in the Ruby API) to create sub-accounts and upload datafeeds to them.
This is working fine.
However, I need to be able to delete a bunch of sub-accounts, as we've hit the limit of sub-accounts that we can use.
So I wrote a quick script to do this using the same credentials that we use to create sub-accounts. The method on the Ruby API object is `#delete_account(merchant_id, sub_account_merchant_id, ...)`.
However that fails with an `Google::Apis::AuthorizationError: Unauthorized` error.
The scope used to authorise the service is "https://www.googleapis.com/auth/content".
Do I need to use another scope to delete sub-accounts?
Or is there something else I'm missing?
Thanks for any and all advice!
   Doug.

Milind Sankeshware (AdWords API Team)

unread,
Jan 31, 2018, 3:35:17 PM1/31/18
to AdWords API Forum
Hi Doug,

On this forum, we handle questions related to the AdWords API. Since your question is related to Google Shopping Content API, could you post the question on their forum?

Thanks.
Milind, AdWords API Team.

doug livesey

unread,
Jan 31, 2018, 5:14:31 PM1/31/18
to AdWords API Forum
Sorry, yes of course -- thanks for pointing me there!
Reply all
Reply to author
Forward
0 new messages