getting api_key from cookies