Authenticate before calling the API