add function to test API keys