{"action":"created","issue":{"url":"https://api.github.com/repos/dropbox/dropbox-sdk-js/issues/234","repository_url":"https://api.github.com/repos/dropbox/dropbox-sdk-js","labels_url":"https://api.github.com/repos/dropbox/dropbox-sdk-js/issues/234/labels{/name}","comments_url":"https://api.github.com/repos/dropbox/dropbox-sdk-js/issues/234/comments","events_url":"https://api.github.com/repos/dropbox/dropbox-sdk-js/issues/234/events","html_url":"https://github.com/dropbox/dropbox-sdk-js/issues/234","id":406294809,"node_id":"MDU6SXNzdWU0MDYyOTQ4MDk=","number":234,"title":"Error when adding custom properties to a file","user":{"login":"marcelo2605","id":2372927,"node_id":"MDQ6VXNlcjIzNzI5Mjc=","avatar_url":"https://avatars1.githubusercontent.com/u/2372927?v=4","gravatar_id":"","url":"https://api.github.com/users/marcelo2605","html_url":"https://github.com/marcelo2605","followers_url":"https://api.github.com/users/marcelo2605/followers","following_url":"https://api.github.com/users/marcelo2605/following{/other_user}","gists_url":"https://api.github.com/users/marcelo2605/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelo2605/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelo2605/subscriptions","organizations_url":"https://api.github.com/users/marcelo2605/orgs","repos_url":"https://api.github.com/users/marcelo2605/repos","events_url":"https://api.github.com/users/marcelo2605/events{/privacy}","received_events_url":"https://api.github.com/users/marcelo2605/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-02-04T11:53:40Z","updated_at":"2019-02-04T14:18:39Z","closed_at":"2019-02-04T14:18:39Z","author_association":"NONE","body":"Here is my function to add custom properties values to a specific file. The template is already created.\r\n\r\n```\r\nvar fetch = require('isomorphic-fetch');\r\nnew Dropbox({\r\n\tfetch: fetch,\r\n\taccessToken: '...'\r\n})\r\n.filePropertiesPropertiesAdd({\r\n\tpath: \"/wallpapers/WhatsApp Image 2018-12-31 at 20.55.09.jpeg\",\r\n\tproperty_groups: {\r\n\t\t\"template_id\": \"...\",\r\n\t\t\"fields\": [\r\n\t\t\t{\r\n\t\t\t\t\"name\": \"Theme\",\r\n\t\t\t\t\"value\": \"Animais\"\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\t\"name\": \"Author\",\r\n\t\t\t\t\"value\": \"Ana\"\r\n\t\t\t}\r\n\t\t]\r\n\t}\r\n})\r\n```\r\n\r\nAfter run it, I got this error:\r\n\r\n> \"Error in call to API function \"file_properties/properties/add\": request body: property_groups: expected list, got dict\""},"comment":{"url":"https://api.github.com/repos/dropbox/dropbox-sdk-js/issues/comments/460265161","html_url":"https://github.com/dropbox/dropbox-sdk-js/issues/234#issuecomment-460265161","issue_url":"https://api.github.com/repos/dropbox/dropbox-sdk-js/issues/234","id":460265161,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2MDI2NTE2MQ==","user":{"login":"greg-db","id":8700917,"node_id":"MDQ6VXNlcjg3MDA5MTc=","avatar_url":"https://avatars1.githubusercontent.com/u/8700917?v=4","gravatar_id":"","url":"https://api.github.com/users/greg-db","html_url":"https://github.com/greg-db","followers_url":"https://api.github.com/users/greg-db/followers","following_url":"https://api.github.com/users/greg-db/following{/other_user}","gists_url":"https://api.github.com/users/greg-db/gists{/gist_id}","starred_url":"https://api.github.com/users/greg-db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greg-db/subscriptions","organizations_url":"https://api.github.com/users/greg-db/orgs","repos_url":"https://api.github.com/users/greg-db/repos","events_url":"https://api.github.com/users/greg-db/events{/privacy}","received_events_url":"https://api.github.com/users/greg-db/received_events","type":"User","site_admin":false},"created_at":"2019-02-04T14:18:39Z","updated_at":"2019-02-04T14:18:39Z","author_association":"CONTRIBUTOR","body":"[Cross-linking for reference: [https://stackoverflow.com/questions/54515896/dropbox-api-error-when-adding-custom-properties-to-a-file](https://stackoverflow.com/questions/54515896/dropbox-api-error-when-adding-custom-properties-to-a-file) ]\r\n\r\nIt looks like you already got an answer for this on StackOverflow, but to confirm, yes, this error message indicates you are supplying the wrong type for the `property_groups` parameter. It should be a `list`. You can find [the documentation here](https://dropbox.github.io/dropbox-sdk-js/global.html#FilePropertiesAddPropertiesArg)."}}
{"actor":{"display_login":"greg-db"}}