Views: 5431
Last Modified: 23.03.2022
The method gets information on folder storing files for chat
Revision: 18
Get information on the current API revision (platform version) – im.revision.get.
Parameters
Parameter |
Example |
Req. |
Description |
Revision |
CHAT_ID |
17 |
Yes |
Chat ID |
18 |
|
Method call
JavaScript
BX24.callMethod('im.disk.folder.get', {
'CHAT_ID': 17,
}, function(result){
if(result.error())
{
console.error(result.error().ex);
}
else
{
console.log(result.data());
}
});
PHP
$result = restCommand('im.disk.folder.get', Array(
'CHAT_ID' => 17,
), $_REQUEST["auth"]);
Example of response
{
"result": {
ID: 127
}
}
Example of response when error occurs
{
"error": "CHAT_ID_EMPTY",
"error_description": "Chat ID can't be empty"
}
Description of keys:
error
– error code
error_description
– brief description of error
Possible error codes
Code |
Description |
CHAT_ID_EMPTY |
Chat ID not passed |
ACCESS_ERROR |
Current user does not have appropriate permissions to access the dialog |
INTERNAL_ERROR |
Server error, please contact technical support |
|
Attention:
restCommand function is used here for illustration purposes only. It is taken from the
EchoBot example. You can send a REST command with your own function, or use the
BX24.callMethod or
bitrix24-php-sdk methods.