0

device_id={UNIQUE_ID}&key={CUSTOMER_KEY}

I have tried following as many examples as I could find online, but there really wasn't a lot that was helpful for me. I'm using Python and have imported the msgpack and did this:

msgpack.packb([device_id:00000000-0000-0000-0000-000000000000,customer_key:0123456789abcdef])

But I get an error it's invalid syntax, with the colon indicated as the offending character. I wanted to out the msgpack code into a CURL and send it. But so far, I'm doing something wrong in how I define my key/values here.

Lynn
  • 559
  • 1
  • 6
  • 22
  • You should probably use a dict and not a list. `msgpack.packb({"device_id":"00....", "customer_key":"..." })` – haki Jul 09 '15 at 06:05
  • No that doesn't work either.... I also tried it with the use_list flag set to false...still no joy: msgpack.packb(["customer_key":"0123456789abcdef","device_id":"00000000-0000-0000-0000-000000000000"], use_list=False) – Lynn Jul 09 '15 at 06:17
  • Well, I may have figured it out. I put the entire thing into single quotes...but it seems that most of it emerged only semi-msgpacked? Odd. Here were the results: '\x91\xda\x00Ldevice_id=00000000-0000-0000-0000-000000000000&customer_key=0123456789abcdef' Does that look proper? – Lynn Jul 09 '15 at 06:38

0 Answers0