thread safe API. now, access token can be passed in separately.