Peter L
Peter L

Reputation: 21

What is the type of "profileId" parameter in Google API requests?

As a Google API newbie I want to check my access using an authenticated request in APIs Explorer. (My final goal is to extract meaningful reports from DCM/DFA Reporting & Trafficking API.) Our agency contact has set up a new user profile for me and I have signed on to API Manager, created a test Project, and generated an API Key, all with no issues. I assume this proves my user profile does have access to a DCM account that is 'enabled for API access'.

As a next step I've tried submitting a few simple requests to dfareporting.userProfiles.get but can't figure out what value to enter in the mandatory 'profileId' field. On the query form, it's described as "User profile ID associated with this request. (string)" so I tried entering my user profile.

The response is error code 400 with reason "invalidParameter" & message "Invalid long value: '[email protected]_123456'". Which, to me, says this parameter must be an integer and not a string. Problem is, I only know of one ID number: "123456" - the 6 digit value that identifies the DCM Account which my profile belongs to. I tried entering that number in the profileId field, and got a different error. Reason:

"authError", message: "1072 : Failed to authenticate. User profile ID 123456 not found."

Given my 30+ years of non-Google (amateur) coding experience, I figure there must be an easy way for me to learn what is the correct ID number - but what? How? I've tried looking in Google's documentation and various forums etc, but it seems either I'm searching for the wrong keywords or else the answer is so blindingly obvious that no-one has ever needed to mention it, anywhere.

Upvotes: -1

Views: 1695

Answers (1)

Peter L
Peter L

Reputation: 21

I've got it, with help from our agency's DCM Administrator. In case anyone else has the same question, the 'profileId' API parameter is a serial number which for me is 7 digits. In the DCM Administrator tool it is officially called "UserID". Oddly, your UserID is not included in the system-generated "welcome" email, and your administrator may not be in the habit of sharing it manually.

Upvotes: 1

Related Questions