When fetching all the emails with users.messages.list you can filter them so you will only get the emails that are on the INBOX.
Using the parameter labelIds
:
So a call would be like:
https://gmail.googleapis.com/gmail/v1/users/me/messages?labelIds=INBOX&key=[YOUR_API_KEY]
You can test the filters on the Try this API section of the API method
CLICK HERE to find out more related problems solutions.