Unable to post drop notification

While implementing Twitch Drops integration with our game I successfully followed all steps except the last - sending drop notification to twitch.

My manifest file looks like this

{
  "campaign_id": "2d9730c5-b6bd-4f98-8fd3-c6dcb982df26",
  "client_id": "<client id>",
  "game_watched": "<game name from vhs>",
  "broadcaster_id": "GameUsername1",
  "item_id": "2d9730c5-b6bd-4f98-8fd3-c6dcb982df26",
  "reason": "watching",
  "users": [
    "GameUsername2"
  ]
}

And it’s successfully uploaded to the url received from twitch (response status 200), but after waiting for almost 20 minutes I still don’t see any notification from twitch and my inventory is empty.

What am I missing here?
P.S. Judging from the list of threads in this forum it seems to be quite a frequent problem and I’m really looking forward for these announced tools for Drops debugging.

Your uploaded text is including the headers and some sort of request ID or something?

--3Y[...redacting ID if it is sensitive]
Content-Disposition: form-data; name="manifest-json.json"; filename="manifest-json.json"
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary

I still don’t know exactly what was the problem, but I changed a bit how we were using our http library and it seems to work fine now.

For anyone struggling with similiar problem and happens to be using Apache HttpClient from JVM language - make entity for your request via basic EntityBuilder and not MultipartEntityBuilder.

E.g. in our case I replaced

val put = HttpPut(uploadUrl)
put.entity = MultipartEntityBuilder.create()
                .addBinaryBody("manifest-json.json", manifest.toByteArray(Charsets.UTF_8))
                .build()

with

val put = HttpPut(uploadUrl)
put.entity = EntityBuilder.create().setBinary(manifest.toByteArray())
                .setContentType(ContentType.APPLICATION_FORM_URLENCODED).build()

and it seems to work fine now.

Cheers for @matwalsh for help.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.