RTB API: Reasons for UNKNOWN_ID and BAD_COOKIE

37 views
Skip to first unread message

Bharath Maroli

unread,
Sep 26, 2025, 4:44:19 PMSep 26
to Authorized Buyers API Forum
Hey team,

I am using this API for bulk upload as per this document. document.

This is the API that i am trying to use

curl --location 'https://cm.g.doubleclick.net/upload?nid=adnear_ddp' \
--header 'Content-Type: application/json' \
--data '{
  "UserDataOperation":[{
    "user_id":"137C651C-2771-4AC0-AA10-4AFC378E063E",
    "user_id_type":"ANDROID_ADVERTISING_ID",
    "user_list_id":"9200941806"
  },
  {
    "user_id":"1531C099-5885-4D35-B8E6-4EE3F8611DB1",
    "user_id_type":"IDFA",
    "user_list_id":"9200941806"
  }],
  "send_notifications": false,
  "process_consent": true
}'

The payload for the curl is sent as a byte array serialized using the proto file provided in the document.

As a sample I have sent 100 IDs (in the curl only 2 are provided). And the response for the request was "Partial Success" as mentioned in the document.

In the response body while traversing the error list (which I believe you return for those IDs which were not successful) for the individual IDs I am getting the error_code as  `unknown_id` and `bad_cookie`. sample error list response provided below.

[user_id: "137C651C-2771-4AC0-AA10-4AFC378E063E"
error_code: BAD_COOKIE
user_id_type: ANDROID_ADVERTISING_ID
, user_id: "1531C099-5885-4D35-B8E6-4EE3F8611DB1"
error_code: UNKNOWN_ID
user_id_type: IDFA
]

we know that IDs which have an error_code as `UNKNOWN_ID`, the IDs are not present in your system.
Wanted to know for which situation does the ID get the error_code as BAD_COOKIE ?

also needed your assistance for the following
1) is there any way to recognize those IDs for whom the status was UNKNOWN_ID ?
2) For the IDs which return as BAD_COOKIE is there anything that I should pass extra in the payload for it to be successful ?

Regards
Bharath Maroli

Authorized Buyers API Forum Advisor

unread,
Sep 30, 2025, 12:49:03 PMSep 30
to bha...@azira.com, google-doubleclick-a...@googlegroups.com
Hello Bharath,

Thanks for reaching out.

In your first example, the ID 137C651C... is an iOS IDFA, but the user_id_type was sent as ANDROID_ADVERTISING_ID. This format mismatch is the likely cause of the BAD_COOKIE error.

For your second example, the UNKNOWN_ID error most commonly occurs when there is no matching user ID in our system.

Could you confirm if cookie matching has been performed for all the IDs you are sending?

 

Thanks,
 
Google Logo
Joshua
Authorized Buyers API Team


Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-09-30 16:46:21Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01u7iK7:ref" (ADR-00333845)



Bharath Maroli

unread,
Oct 14, 2025, 1:09:16 PMOct 14
to Authorized Buyers API Forum
Hey team,

From the conversations above, just wanted to clarify something.

1) When we hit the bulk upload API, lets assume we pass 100 IDs and in the response it returns me an error list with 34 IDs (error_status of the IDs might be unknown_ID or BAD_COOKIE) so can we assume that rest of the 66 IDs were successful and are accepted ? also is there any portal or dashboard or an API where i can see these successful IDs ?

2) The IDs which has been returned as BAD_COOKIES (initially sent with the user_id_type as ANDROID_ADVERTISING_ID) when the same ID is retried with user_id_type as IDFA the response was still BAD_COOKIES, is there a way to know which is the correct user_id_type to be passed for the IDs to be successful ?

3) Even when using the GENERIC_DEVICE_ID as the user_id_type i am getting the errors as BAD_COOKIE, as per documentation GENERIC_DEVICE_ID is "Allows partner uploads without needing to select a specific, pre-existing Device ID type" - So UNKNOWN_ID can be possible. if i am getting BAD_COOKIE as an error is there something else i have to send in the request ?

Thanks 
Bharath Maroli

Authorized Buyers API Forum Advisor

unread,
Oct 20, 2025, 12:48:29 PM (10 days ago) Oct 20
to bha...@azira.com, google-doubleclick-a...@googlegroups.com
Hello Bharath,

Please see the responses to your questions below:
  1. You can normally assume that any IDs not in the error list were successful. However, you should validate that through the response. Unfortunately, there isn't any portal, dashboard, or API where you can see these successful IDs.
  2. The BAD_COOKIE error generally means the user_id provided is malformed or invalid. There isn't a way for the API to tell you the 'correct' user_id_type. You must ensure you are sending valid IDs that conform to the correct format for their type.
  3. The GENERIC_DEVICE_ID needs to be in a valid UUID format, according to the proto documentation. Could you confirm if your IDs comply with this?
If you can provide the full code implementation, the raw request, and the responses you received (for the specific IDs you'd like us to look at), we can investigate further. Feel free to reply privately.

 

Thanks,
 
Google Logo
Joshua
Authorized Buyers API Team


Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-10-20 16:36:58Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01u7iK7:ref" (ADR-00333845)



Reply all
Reply to author
Forward
0 new messages