google-ads-php: Google Ads query function does return INTERNAL ERROR ENCOUNTERED

Greetings Ads Team!

I have used Google Ads PHP library v0 and it was worked well. Since version 0 is deprecated a few days ago, I have upgraded version to v1.

After that, all Google ads query function does not work and always return following exception and can’t find specific issue related to this one.

{↵ "message": "Internal error encountered.",↵ "code": 13,↵ "status": "INTERNAL",↵ "details": []↵}

Is this Ads API internal issue or Something wrong on my side?

Thank you

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 52 (18 by maintainers)

Most upvoted comments

@BeautifulCodeStar

If I understood correctly, I am not sure why you are still talking about this. I think we are talking about account access by TOKEN, like by OAuth2 authentication.

I’m afraid that you don’t understand what I explain and ask you to try. Could you please stop using login-customer-id for now and try? Again, the login-customer-id header is for the case when you want to specify the account ID you want to log in as (similar to when you log into the UI). That’s valid only when you manage accounts using MCC accounts in a hierarchy.

In your case, 7509260745 IS NOT LINKED to any MCC accounts. So, it’s not related to 992-748-0321 AT ALL. (Probably they would have been linked together, but they’re not now) That’s why when you still send 992-748-0321 as the login-customer-id (if I understand correctly that you’ve not changed anything except for a refresh token since this reply), it keeps failing. It’s like you’re trying to set a random account as the login-customer-id header. That’s not supposed to work, right?

I know you said that it worked before, but there were many changes including this login-customer-id logic, during v0 to v1 transition. And most importantly, 7509260745 is not linked to 992-748-0321 anymore. What we’re trying to diagnose now is NOT RELATED TO refresh and access tokens, but rather the login-customer-id header. So please try deleting the login-customer-id line in the config file first and see what happens, so I can help you in the next step. 😃

@AnashOommen I did last week and the error is authentication error because of the permission denied. That’s because, as I’m trying to say several times above, login-customer-id cannot be used in this case because 7509260745 is just a single account not managed by any MCC accounts. If the login-customer-id header is to be specified, it should be at least 7509260745 itself. It’s rather not specified at all in this case.