Refactored to pass in userAuthTicket via APIContext instead of resource/client parameter.