Changed get messages to take API Key