0
votes

I'm trying to call Users.messages: get api using POSTMAN:

Request type : GET
Request : https://www.googleapis.com/gmail/v1/users/<my-email>/messages/<id>?key=<API-KEY>
Authorization : Bearer-token : <access_token received on successful login using Google>

What is the value of id?

What else is required to be added ?

Why does this return this error?

400. That’s an error. Your client has issued a malformed or illegal request. That’s all we know.
1

1 Answers

0
votes

The 400 error code means you are sending the request in the wrong way. I could guess it's because you are sending an id which doesn't exist, due to the fact you don't know what represents.

That id, as the docs says, represents:

The ID of the message to retrieve.

One easy way to retrieve the messages' id, it's using the Users.messages: list endpoint and then you can try to retrieve that specific message using the Try this API tool.