Add new test case for api_key
Add new hook for api_key