get_messages API call