Announcements
Do you have an idea for Dropbox Paper? Share it with us!

https://api.dropboxapi.com/2/team_log/get_events

New member | Level 2

Filtering team events by timerange is not working. After specifying start_time and end_time it's still giving all the events.

    url = BASE_URL + "team_log/get_events"
    params = {
        "time": {
            "start_time": "2017-06-29T06:40:45Z",
            "end_time": "2018-01-25T15:51:30Z",
        },
    }
    response = requests.post(url, headers=custom_header, data=json.dumps(params))
1 Reply

Re: https://api.dropboxapi.com/2/team_log/get_events

Dropboxer

Are you setting the 'Content-Type' value for your request? It would be in your custom_header variable but you didn't share the definition for that.

You should set it like:

"Content-Type": "application/json"

If you don't, the API call parameters won't get sent properly. 

You can use the API Explorer to help prototype these calls. Click "Show Code" and select "Python request (requests library)" for this case.

Reply
Loading...
API Support

Have a question? Our Dropbox Community is here to help you find an answer!
You won’t have to wait too long for a reply, but why not learn more about the Community while you’re here.

Not the right discussion for you? Find out what else our Community has to say about API Support.

Or, search our Help Center for even more.

Who's talking
Top contributors to this post