Form access parameters
Forms the structure of basic authorization data
Function FormAccessParameters(Val ApiUrl, Val MediaUrl, Val IdInstance, Val ApiTokenInstance) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| ApiUrl | --api | String | ✔ | API host link |
| MediaUrl | --media | String | ✔ | Link to host API for sending files |
| IdInstance | --id | String | ✔ | Unique instance number |
| ApiTokenInstance | --token | String | ✔ | Instance access key |
Returns: Structure - Structure of access parameters
tip
More details in the API documentation: Get access parameters to instance
1C:Enterprise/OneScript code example
ApiUrl = "https://3100.api.green-api.com/v3";
MediaUrl = "https://3100.api.green-api.com/v3";
IdInstance = "31003...";
ApiTokenInstance = "17915d8e0b4b4975a183478da...";
Result = OPI_GreenMax.FormAccessParameters(ApiUrl, MediaUrl, IdInstance, ApiTokenInstance);
- Bash
- CMD/Bat
oint greenmax FormAccessParameters \
--api "***" \
--media "https://3100.api.green-api.com/v3" \
--id "3100309139" \
--token "***"
oint greenmax FormAccessParameters ^
--api "***" ^
--media "https://3100.api.green-api.com/v3" ^
--id "3100309139" ^
--token "***"
Result
{
"apiUrl": "https://3100.api.green-api.com/v3",
"mediaUrl": "https://3100.api.green-api.com/v3",
"idInstance": "3100309139",
"apiTokenInstance": "***"
}