def get_message_ids(service):
    """
    Returns all the message ids from the user
    'INBOX'.
    """
    msg_list = service.users().messages().list(userId='me',
                                               labelIds='INBOX').execute()
    message_ids = msg_list['messages']
    return message_ids