Mahesh Kavathiya
Mahesh Kavathiya

Reputation: 573

Ride Reminders Uber Api got JSON error

Hello I am trying implement Ride Reminder Uber API in my project but I got error response like:

Reference URL:

https://developer.uber.com/docs/v1-reminders-post

JSON Error Response:

{
"message": "Unable to parse JSON in request body.",
"code": "invalid_json"
}

URL

https://api.uber.com/v1/reminders

Headers:

Content-Type: application/json
Authorization: Token vzOv0AaaZVRaV1FiZLt9SPU2ZgIrBgQ6uZy6j4Gr

Post Params:

reminder_time:1451496600(Unix UTC timestamp of when the reminder will occur.)
phone_number: +91xxxxxxxxxx(India's number)
server_token: vzOv0AaaZVRaV1FiZLt9SPU2ZgIrBgQ6uZy6j4Gr
event: {
         "time": "1451498400",
         "longitude": "72.5290",
         "latitude": "23.0384",
         "location": "Vastrapurlake",
         "name": "Test"
      }

More detail check PostMan Screen shots:

Post Params:Click here Header Params:Click here

Can you please help me out, Thanks In Advance!!

Upvotes: 2

Views: 152

Answers (1)

Paresh Gami
Paresh Gami

Reputation: 4792

Your Content-Type and token are valid dont change anything there.

Just convert your params in json dont forgot to use double quote.

You have to pass these data as json format in postman.

{"reminder_time":"1451649600",
"phone_number": "+91<YOUR-MOBILE-NUMBER>",
"server_token": "vzOv0AaaZVRaV1FiZLt9SPU2ZgIrBgQ6uZy6j4Gr",
"event": {
         "time": "1451649600",
         "longitude": "72.5290",
         "latitude": "23.0384",
         "location": "Vastrapurlake",
         "name": "Test"
      }}

enter image description here

Upvotes: 3

Related Questions