Gmail API // Move from SPAM to main INBOX

Hi all,

I managed to connect to the Gmail API using the right scope. Now I need to move emails from my spam folder to the main inbox.

Here is my call

When doing so, I get the following error.

What is wrong ?
image

Thanks

I think your values need to be wrapped in "

INBOX → “INBOX”

thanks @reger-alexander I tried with the “INBOX” but it does nit work

You also need to set the SPAM between “” I guess

@Jici I did it for both “INBOX” and “SPAM”. Still not working

Which error do you get actually?

I’m wondering if the ID is the same thing as the “value”. So I guess you must first check

to get all label list. And check if the ID you are using is the correct one.

I have the same error message

I tried this endpoint. I confirm the IDs are the right ones

image

Completely forget to check that, but actually you don’t have content-type set
Add header
Content-type and set value to application/json

1 Like

OF COURSE ! Now it works :slight_smile: Thanks a lot

1 Like