Skip to content

Using GREEN API Hosts#

To make HTTP API requests to the GREEN API servers, you must use the parameters specified in your instance settings on console:

  • apiUrl - link to GREEN API host to execute methods
  • mediaUrl - link to GREEN API host for sending files (methods UploadFile, SendFileByUpload)
  • idInstance - unique number of your sequence
  • apiTokenInstance - your instance access key

When executing requests with parameters from console it guarantees a minimum request execution time and a high probability of successful request completion.

  1. Changing the host on partner account
  2. How to smoothly transfer instances to dedicated servers
  3. The impact of changing the host on the integration

1. Changing the host on the partner account#

In case of transferring a partner account to work on dedicated servers, it is recommended to gradually transfer all current instances to new servers. To do this, simply delete the old instance and create a new one. Transfer to dedicated servers is carried out for more stable operation of the system.

When migrating to dedicated servers, you can temporarily use a universal host to run old and new instances.

  • Universal host: https://api.greenapi.com
  • Universal media host for sending files: https://media.greenapi.com

In the future, when moving to new instances on dedicated servers, you should change the host to the one specified in console to reduce the API response time and reduce the likelihood of availability problems.

2. How to smoothly transfer instances to dedicated servers#

There are no restrictions on the timing of the transition to new instances on dedicated servers.

If there is a need to change the instance, you can use the moments when the instance becomes unauthorized, for example:

  1. When the client unlinks the device
  2. If the client switches from Business plan to partner plan, when deleting Business instances
  3. When instances log out automatically;

3. Impact of changing hosts on the integration#

Using a host not intended for the instance can break the integration; it is necessary to temporarily use universal hosts when working during the transition period.
Transferring instances to dedicated servers and changing hosts when specifying a temporary host and switching to the recommended one occurs unnoticed by clients and does not affect the operation of the integration.