Client settings
Configuration
Timeouts, proxies, regions and per-request configuration.
Everything on this page is set on the client and applies to every call made through it.
Timeouts#
Defaults are generous enough for interactive calls but not for large imports or exports. Raise the read timeout before moving large files.
// Timeouts are supplied when the client is constructed.
var ac = new analyticsClient(clientId, clientSecret, refreshToken);
ac.requestTimeout = 60000; // millisecondsProxy#
ac.setProxy('proxy.example.com', 8443, 'proxyUser', 'proxyPassword');Region#
ac.setAnalyticsServerURL('https://analyticsapi.zoho.eu');
ac.setAccountsServerURL('https://accounts.zoho.eu');See Authentication for the full host table.
Request configuration#
Most methods take a final config value carrying optional parameters for that endpoint — filter criteria, output format, pagination and so on.
var config = {
'viewTypes': ['0', '1']
};
var views = await workspace.getViews(config);Supplying an access token directly#
ac.setAccessToken('1000.xxxxxxx.xxxxxxx');Node.js notes#
- Unhandled rejections crash the process on modern Node; always attach a
catchor wrapawaitintry. configdefaults to{}.
Related#
- Authentication — credentials and the token throttle.
- Errors — what a failure looks like.