GTM Container ID not being accepted

724 Views Asked by At

I'm trying to pull a list of tags within our GTM container but keep getting this error:

{
  "error": {
    "code": 400,
    "message": "Invalid container_id (base 10 number expected): 'GTM-KXLNC6'",
    "errors": [
      {
        "message": "Invalid container_id (base 10 number expected): 'GTM-KXLNC6'",
        "domain": "global",
        "reason": "badRequest"
      }
    ],
    "status": "INVALID_ARGUMENT"
  }
}

The container ID I'm using is GTM-KXLNC6, which is correct so not sure why I'm getting the error?

1

There are 1 best solutions below

0
Christopher Penn On

This is because the container ID is a numeric variable, not the publicly accessible GTM-xxxxxx. You'll see it in the URL when you're logged in.

https://tagmanager.google.com/#/container/accounts/XXXX/containers/YYYY/workspaces/ZZZZ

It's the numbers in YYYY above.