Check region using API

Hello,

I want to know my region and depending on which region I am, I will set up specific settings.
I would like to do that using the API.

For example, to check if BYOC is enabled/disabled, there is GET/api/v2/authorization/products and then check if there is an entity "byoc".

Is there something similar for region?

Thank you!

Hello,

What do you mean by region?
Are you referring to the regions for Genesys Cloud deployments?

If that's the case, then I don't think I understand the question.

One of the first steps before connecting your application (code leveraging Platform API) is to set the region (i.e., environment), so that the SDK uses the Platform API base url corresponding to the requested region.
See here: https://developer.mypurecloud.com/api/rest/client-libraries/java/#setting_the_environment

If your question is about creating a web app, exposed in Genesys Desktop, using a Custom Client Application integration or an Interaction Widget integration (see here) or a Premium Application Wizard/Installer, it is possible to get the environment/region as url parameter.
Genesys Desktop supports url interpolation with these 3 type of integrations. When the Genesys Desktop loads the web app (as Custom Client App, as Interaction Widget or as Premium Application), it will invoke the url defined in the integration and it can pass region and language of the user who is making the call to the web app from his Genesys Desktop.
Note that there is an error on this page. The url configured in the integration (Custom Client App, Interaction Widget, Premium App) should be: https://myapp.com?langTag={{pcLangTag}}&environment={{pcEnvironment}}
When Genesys Desktop loads the web app, it will invoke the configured url replacing {{pcLangTag}} and {{pcEnvironment}} with the language and Genesys Cloud region of the logged in user: https://myapp.com?langTag=en-us&environment=mypurecloud.com

Regards,

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.