Updated API for authorization.