You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Genesys Cloud Login and API URL path can be overridden if necessary (i.e. if the Genesys Cloud requests must be sent through to an intermediate API gateway or equivalent).
350
+
351
+
This can be achieved defining a "gateway" configuration, in the INI or the JSON configuration file.
352
+
353
+
* "host" is the address of your gateway.
354
+
* "protocol" is not mandatory. It will default to "https" if the parameter is not defined or empty.
355
+
* "port" is not mandatory. This parameter can be defined if a non default port is used and needs to be specified in the url (value must be greater or equal to 0).
356
+
* "path_params_login" and "path_params_api" are not mandatory. They will be appended to the gateway url path if these parameters are defined and non empty (for Login requests and for API requests).
357
+
* "username" and "password" are not used at this stage. This is for a possible future use.
358
+
359
+
With the configuration below, this would result in:
360
+
361
+
* Login requests to: "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin" (e.g. "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin/oauth/token")
362
+
* API requests to: "https://mygateway.mydomain.myextension:1443/myadditionalpathforapi" (e.g. "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin/api/v2/users/me")
363
+
364
+
INI:
365
+
366
+
```ini
367
+
[logging]
368
+
log_level = trace
369
+
log_format = text
370
+
log_to_console = false
371
+
log_file_path = /var/log/javascriptsdk.log
372
+
log_response_body = false
373
+
log_request_body = false
374
+
[reauthentication]
375
+
refresh_access_token = true
376
+
refresh_token_wait_max = 10
377
+
[general]
378
+
live_reload_config = true
379
+
host = https://api.mypurecloud.com
380
+
[gateway]
381
+
host = mygateway.mydomain.myextension
382
+
protocol = https
383
+
port = 1443
384
+
path_params_login = myadditionalpathforlogin
385
+
path_params_api = myadditionalpathforapi
386
+
username = username
387
+
password = password
388
+
```
389
+
390
+
JSON:
391
+
392
+
```json
393
+
{
394
+
"logging": {
395
+
"log_level": "trace",
396
+
"log_format": "text",
397
+
"log_to_console": false,
398
+
"log_file_path": "/var/log/javascriptsdk.log",
399
+
"log_response_body": false,
400
+
"log_request_body": false
401
+
},
402
+
"reauthentication": {
403
+
"refresh_access_token": true,
404
+
"refresh_token_wait_max": 10
405
+
},
406
+
"general": {
407
+
"live_reload_config": true,
408
+
"host": "https://api.mypurecloud.com"
409
+
},
410
+
"gateway": {
411
+
"host": "mygateway.mydomain.myextension",
412
+
"protocol": "https",
413
+
"port": 1443,
414
+
"path_params_login": "myadditionalpathforlogin",
415
+
"path_params_api": "myadditionalpathforapi",
416
+
"username": "username",
417
+
"password": "password"
418
+
}
419
+
}
420
+
```
421
+
349
422
## Environments
350
423
351
424
If connecting to a Genesys Cloud environment other than mypurecloud.com (e.g. mypurecloud.ie), set the environment on the `ApiClient` instance with the PureCloudRegionHosts object.
The Genesys Cloud Login and API URL path can be overridden if necessary (i.e. if the Genesys Cloud requests must be sent through to an intermediate API gateway or equivalent).
434
+
435
+
This can be achieved setting the gateway configuration on the `ApiClient` instance.
// If you need, you can later remove the Gateway Configuration and fallback to the Enviroment setting using: client.setGateway();
442
+
```
443
+
444
+
* "host" is the address of your gateway.
445
+
* "protocol" is not mandatory. It will default to "https" if the parameter is not defined or empty.
446
+
* "port" is not mandatory. This parameter can be defined if a non default port is used and needs to be specified in the url (value must be greater or equal to 0).
447
+
* "path_params_login" and "path_params_api" are not mandatory. They will be appended to the gateway url path if these parameters are defined and non empty (for Login requests and for API requests).
448
+
* "username" and "password" are not used at this stage. This is for a possible future use.
449
+
450
+
With the configuration below, this would result in:
451
+
452
+
* Login requests to: "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin" (e.g. "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin/oauth/token")
453
+
* API requests to: "https://mygateway.mydomain.myextension:1443/myadditionalpathforapi" (e.g. "https://mygateway.mydomain.myextension:1443/myadditionalpathforlogin/api/v2/users/me")
0 commit comments