Hi Google Ads API Team,

I’m building an integration using the REST API (v21) with a *developer 
token approved for Test Access only*.

My setup 

   - 
   
   *Account 1: account@.....*
   - 
      
      Has a developer token (ID: a7d3rvlyJBNO9haM1DVPnA)
      - 
      
      Status: *Test Access only*
      - 
      
      Can call customers:listAccessibleCustomers successfully
      - 
      
      ⚠️ Does *not* show the red “Test account” label in the UI
      - 
   
   *Account 2: ratoblaas6@....*
   - 
      
      Shows the red “Test account” label in the UI
      - 
      
      ⚠️ API Center is disabled:
      *“The API Center is not available for test accounts. Use the 
      developer token from your production manager account (not a test 
account).”*
      - 
      
      So I cannot get a developer token here.
      
This leaves me in a situation where:


   - 
   
   One account has a Dev Token but no red label.
   - 
   
   The other has the red label but no Dev Token.
   
   
What works ✅ 

I can fetch accessible accounts with the test developer token:

export async function getAccessibleCustomerId(userAccessToken: string) {
  const res = await fetch(
    
"https://googleads.googleapis.com/v21/customers:listAccessibleCustomers";,
    {
      headers: {
        Authorization: `Bearer ${userAccessToken}`,
        "developer-token": process.env.GOOGLE_DEVELOPER_TOKEN!,
      },
    }
  );
  return await res.json();
}

*This returns valid customer IDs (e.g. customers/1234567890).*


What fails ❌ 


*a. Sending MCC invitation (customerClientLinks:mutate)*export async 
function inviteClientFromMcc(clientCustomerId: string) {
  const MCC_ID = process.env.SANDBOX_MANAGER_ID!;
  const mccAccessToken = await getMccAccessToken();

  const res = await fetch(
    
`https://googleads.googleapis.com/v21/customers/${MCC_ID}/customerClientLinks:mutate`,
    {
      method: "POST",
      headers: {
        Authorization: `Bearer ${mccAccessToken}`,
        "developer-token": process.env.GOOGLE_DEVELOPER_TOKEN!,
        "login-customer-id": MCC_ID,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        operation: {
          create: {
            clientCustomer: `customers/${clientCustomerId}`,
            status: "PENDING",
          },
        },
      }),
    }
  );

  return await res.json();
}

export async function inviteClientFromMcc(clientCustomerId: string) {
  const MCC_ID = process.env.SANDBOX_MANAGER_ID!;
  const mccAccessToken = await getMccAccessToken();

  const res = await fetch(
    
`https://googleads.googleapis.com/v21/customers/${MCC_ID}/customerClientLinks:mutate`,
    {
      method: "POST",
      headers: {
        Authorization: `Bearer ${mccAccessToken}`,
        "developer-token": process.env.GOOGLE_DEVELOPER_TOKEN!,
        "login-customer-id": MCC_ID,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        operation: {
          create: {
            clientCustomer: `customers/${clientCustomerId}`,
            status: "PENDING",
          },
        },
      }),
    }
  );

  return await res.json();
}

Response:

{ "error": { "code": 403, "message": "The caller does not have permission", 
"status": "PERMISSION_DENIED", "details": [{ "errors": [{ "errorCode": { 
"authorizationError": "DEVELOPER_TOKEN_NOT_APPROVED" }, "message": "The 
developer token is only approved for use with test accounts." }] }] } }


*b. Creating a client under MCC (createCustomerClient)*export async 
function createCustomerInMcc() {
  const MCC_ID = process.env.SANDBOX_MANAGER_ID!;
  const mccAccessToken = await getMccAccessToken();

  const res = await fetch(
    
`https://googleads.googleapis.com/v21/customers/${MCC_ID}:createCustomerClient`,
    {
      method: "POST",
      headers: {
        Authorization: `Bearer ${mccAccessToken}`,
        "developer-token": process.env.GOOGLE_DEVELOPER_TOKEN!,
        "login-customer-id": MCC_ID,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        customerClient: {
          descriptiveName: `OneClickAds User ${Date.now()}`,
          currencyCode: "USD",
          timeZone: "America/New_York",
        },
      }),
    }
  );

  return await res.json();
}

Response: 

*same 403 PERMISSION_DENIED with DEVELOPER_TOKEN_NOT_APPROVED.*My questions 
❓ 

   1. 
   
   Is it expected that customerClientLinks:mutate and createCustomerClient 
   cannot be used with a *Test Developer Token*?
   - 
      
      The docs say:
      
      “With this token, you can make requests successfully, but only 
      against test accounts.”
      But in practice, only listAccessibleCustomers works.
      
      2. 
   
   Should linking and creating clients also work in sandbox, or are these 
   calls intentionally blocked until *Basic Access* is granted?
   3. 
   
   Since a true Test MCC (red label) cannot generate a developer token, 
   while a Test developer token account does not show the red label, what is 
   the *correct way to test the “invite client to MCC” flow* under test 
   conditions?
   


   

   

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/adwords-api/6867f0c3-e472-4ab0-8de8-0ff611e8f660n%40googlegroups.com.
  • Ca... alisson blaas
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to