r-lib / gmailr

Access the Gmail RESTful API from R.
https://gmailr.r-lib.org
Other
229 stars 56 forks source link

gm_modify_thread returns Bad Request (HTTP 400) no matter what I feed it #150

Open tariuk opened 3 years ago

tariuk commented 3 years ago

I'm trying to add labels to a thread, but have been unable to do it no matter what I feed it.

gm_modify_thread(thread_id$threadId) Error in gm_modify_thread(thread_id$threadId) : Bad Request (HTTP 400).

thread_id is a variable returned by gm_send_message after successfully sending an email. Adding values to add_labels and remove_labels makes no difference in the error, whether the labels are label ids or label names.

jennybc commented 1 year ago

I'm awakening this package from a long nap and it will be a while before I get to questions like this, so I'm putting the closest relevant canned reply below. It does sound like a bug. But I would be much better able to dig into it, if I got a reprex. I.e. the code you execute before gm_modify_thread(thread_id$threadId).


Could you please turn this into a self-contained reprex (short for minimal reproducible example)? It will help us help you if we can be sure we're all working with/looking at the same stuff.

If you've never heard of a reprex before, you might want to start by reading the tidyverse.org help page.

You can install reprex by running (you may already have it, though, if you have the tidyverse package installed):

install.packages("reprex")

Thanks!