Account access management in API (grant other user access to my account)

716 views
Skip to first unread message

Konstantin Kalinin

unread,
Oct 19, 2016, 12:00:29 PM10/19/16
to AdWords API Forum
Hello!
I cant find how to process this action via API call?
http://prntscr.com/cw9ntm

I have an account, and I want to invite another user into this account knowing his email?
I expect API-call like $myAuthorizedUser->invite($otherUserEmail, $accessLevel).

Thank you!

Vishal Vinayak (Adwords API Team)

unread,
Oct 19, 2016, 3:03:18 PM10/19/16
to AdWords API Forum
Hi Konstantin,

Unfortunately, you cannot invite new users to your AdWords account or a manager account using the API. In case you are trying to extent an invite to a client account from a manager account (i.e. linking a manager account to a client account), you can use ManagedCustomerService for that purpose. The ManagedCustomerService.mutateLink method can be used to extend new invitations or make changes to existing invitations. More details can be found here. Please note that AdWords API does not support extending invitations from AdWords client accounts i.e. only manager accounts can extend invitations to AdWords accounts (or other manager accounts).  

Regards,
Vishal, AdWords API Team

Alexey Suslov

unread,
Aug 14, 2017, 5:18:10 AM8/14/17
to AdWords API Forum
Hi Konstantin,

Was your issue solved?
I'm looking for a solution for same problem.

Thanks



среда, 19 октября 2016 г., 19:00:29 UTC+3 пользователь Konstantin Kalinin написал:

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Aug 14, 2017, 12:13:10 PM8/14/17
to AdWords API Forum
Hi Alexey, 

As Vishal mentioned in his post, adding/managing users to an account is not supported via the API. You may have to do that from the user interface. 

Thanks,
Sreelakshmi, AdWords API Team

Carlos Abrantes

unread,
Sep 18, 2017, 3:34:38 PM9/18/17
to AdWords API Forum
Hi Sreelakshmi & Vishal,

I would to retry current pendient invitations with ManagedCustomerService.getPendingInvitations but do not retry nothing (NULL)

This is sample code in PHP as called in https://developers.google.com/adwords/api/docs/guides/accounts-overview

<?php
namespace Google\AdsApi\Examples\AdWords\v201708\AccountManagement;
require 'libs/adwords/vendor/autoload.php';
use Google\AdsApi\AdWords\AdWordsServices;
use Google\AdsApi\AdWords\AdWordsSession;
use Google\AdsApi\AdWords\AdWordsSessionBuilder;
use Google\AdsApi\AdWords\v201708\cm\OrderBy;
use Google\AdsApi\AdWords\v201708\cm\Paging;
use Google\AdsApi\AdWords\v201708\cm\Selector;
use Google\AdsApi\AdWords\v201708\cm\SortOrder;
use Google\AdsApi\AdWords\v201708\mcm\ManagedCustomerService;
use Google\AdsApi\AdWords\v201708\mcm\PendingInvitation;
use Google\AdsApi\AdWords\v201708\mcm\PendingInvitationSelector;
use Google\AdsApi\Common\OAuth2TokenBuilder;

class GetUsersList {

  public static function runExample(AdWordsServices $adWordsServices, AdWordsSession $session) {
    $managedCustomerService = $adWordsServices->get($session, ManagedCustomerService::class);
   
    $selector = new PendingInvitationSelector();
    $invitations = $managedCustomerService->getPendingInvitations($selector);

    var_dump ($invitations);

  }

  public static function main() {
    $oAuth2Credential = (new OAuth2TokenBuilder())
        ->fromFile()
        ->build();
    $session = (new AdWordsSessionBuilder())
        ->fromFile()
        ->withOAuth2Credential($oAuth2Credential)
        ->build();       
        self::runExample(new AdWordsServices(), $session);
  }
}
GetUsersList::main();
?>

How could I retry list of pending invitations?


Sreelakshmi Sasidharan (AdWords API Team)

unread,
Sep 19, 2017, 1:16:45 PM9/19/17
to AdWords API Forum
Hi Carlos, 

Are you saying that the pending invitations are being returned null from the API? If so, could you make sure that you are using the credentials of the client account that should accept the invite and try the same operation? If that does not resolve your issue, could you enable logging and share the SOAP logs along with the client and manager account ids? You can use reply privately to author while sharing the details. 

If your question was different, could you please elaborate? 

Carlos Abrantes

unread,
Sep 20, 2017, 4:55:01 AM9/20/17
to AdWords API Forum
Hi Sreelakshmi,

I post the question in this treat https://groups.google.com/forum/?#!topic/adwords-api/3B0NzpNHn70

Thanks a lot for your interest

Best Regards

smarke...@gmail.com

unread,
Jan 12, 2018, 9:04:08 AM1/12/18
to AdWords API Forum
HI Sreelakshmi,
Seems some third parties can send invitation to OAuth users at once done authentication, then view cmpaign campaigns before they accept the invitation. May think is there any paid or adveanced services from them to do this. Please correct me if i am wrong. Currently i am also in this situation development activity. I need to send invitation through API call itself. Thanks in advance.

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Jan 12, 2018, 12:00:23 PM1/12/18
to AdWords API Forum
Hi, 

Since the question is different from the initial discussion on this thread, could you please create a new forum thread? This will help us keep better track of the issues discussed on this forum. 

Alec Thomas

unread,
Jun 27, 2018, 5:12:15 AM6/27/18
to AdWords API and Google Ads API Forum
Has this changed in the latest version of the API?
OR
Are there any official workarounds for this?

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Jun 27, 2018, 3:29:29 PM6/27/18
to AdWords API and Google Ads API Forum
Hello, 

Starting from V201802 version of the API, whitelisted developers can invite a user to have access to an account by setting the new inviteeEmail and inviteeRole attributes on an ADD ManagedCustomerOperation. Please check the release notes for reference. As specified, please note that this feature is only available for whitelisted developers. Please let me know if you have any additional questions. 

GDZ

unread,
Jul 10, 2018, 4:32:11 PM7/10/18
to AdWords API and Google Ads API Forum
Hello,

am I getting this right and you can only invite user to manage account when account is in "process of creation", i.e. ADD? Not when managed customer account is already created some time ago under our MCC and you just need other person to have access?

Thank you.

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Jul 11, 2018, 11:17:31 AM7/11/18
to AdWords API and Google Ads API Forum
Hello, 

Your understanding is correct. The attributes inviteeemail and inviteeRole are only supported for ADD operation. You will not be able to add new users to an already existing account. Please check the linked documents for reference. 

GDZ

unread,
Jul 11, 2018, 11:25:07 AM7/11/18
to AdWords API and Google Ads API Forum
Are their any plans to implement that? There are situations when we need to give quick access to individual accounts under MCC umbrella to member/members of our team, the only way is manual now.

Thank you!

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Jul 11, 2018, 5:05:26 PM7/11/18
to AdWords API and Google Ads API Forum
Hello,

Unfortunately, I cannot comment on the future plans for this. You could keep an eye on our blog for updates on the upcoming releases. I will share your feedback with the team and let them know your interest. If you are able to share the CID of your account, that will be helpful for us. You can share that by using the reply privately to author option.
Reply all
Reply to author
Forward
0 new messages