1

I'm trying to use the node client for the Podio api to create a task with a reminder. The code works perfectly if i don't set a reminder, but if i try to set a reminder it gives me this error:

message: 
{ error_parameters: {},
 error_detail: null,
 error_propagate: false,
 request: 
  { url: 'http://api.podio.com/task',
    query_string: '',
    method: 'POST' },
 error_description: 'An unexpected error occured during execution',
 error: 'unexpected' },
status: 500,
url: 'https://api.podio.com:443/task',
name: 'PodioServerError' }

This code works:

var body = {
  "text": "test Task",
  "due_on": "2016-12-19 10:00:00",
  "responsible":assignTo, // my user id
}
podio.request("POST", "/task/", body)

But this code with the reminder does not:

var body = {
  "text": "test Task",
  "due_on": "2016-12-19 10:00:00",
  "responsible":assignTo, // my user id
  "reminder": {
     "remind_delta": 30
  }
}
podio.request("POST", "/task/", body)

Am i missing something in the formatting?

Here is the link to the docs page: https://developers.podio.com/doc/tasks/create-task-22419

Thanks!

Jay Dee
  • 71
  • 5

2 Answers2

1

Can you please try it again? Exact same request works just great for me:

curl 
    -H "Content-Type: application/json" 
    -H "Authorization: OAuth2 <my_auth_token>" 
    -X POST 
    -d '{"text":"test Task", 
        "due_on":"2016-12-19 10:00:00", 
        "responsible":<user_id>, 
        "reminder":{"remind_delta":30}}' 
    https://api.podio.com/task/
Pavlo - Podio
  • 2,003
  • 2
  • 10
  • 19
  • Thanks. It looks like i don't get the error if using user authentication. I was using app authentication. Also it looks like task reminders only work if it is the user who sets them themselves. Is that correct? – Jay Dee Dec 17 '16 at 15:21
  • 1
    Yeap, reminders are set for creator and not responsible. It might be bit illogical, but then creator and responsible can have 2 different and independent reminders. As a result, if you authenticate as app, you can't create reminder. – Pavlo - Podio Dec 21 '16 at 02:32
1

Tasks with reminders cannot be created using app authentication. This is because reminders are designed to notify the user who creates the task and not the the user the task is assigned to. The code errors because Podio can not create a reminder for an app instead of a user.

Jay Dee
  • 71
  • 5