wen-gg / tencentcloud-im-sdk-php
TIM REST API
dev-main
2023-01-28 08:28 UTC
Requires
- php: >=5.6
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2 || ^7.0
- tencent/tls-sig-api-v2: 1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-11-28 12:12:18 UTC
README
TIM REST API
Requirements
PHP 5.6 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/tencentcloud/tencentcloud-im-sdk-php.git"
}
],
"require": {
"tencentcloud/tencentcloud-im-sdk-php": "^1.0.6"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/tencentcloud-im-sdk-php/vendor/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); $config = new Configuration(); //TODO: 此处替换成您的SDKAppID,应用 SDKAppID,可在即时通信 IM 控制台(https://console.cloud.tencent.com/im) 的应用卡片中获取。 $config->setSdkappid(123456789); //TODO: 此处替换成您的identifier;用户名,调用 REST API时必须为App管理员帐号 参考:https://cloud.tencent.com/document/product/269/31999#app-.E7.AE.A1.E7.90.86.E5.91.98 $config->setIdentifier("identifier"); //TODO: 此处替换成您的key, 参考:https://cloud.tencent.com/document/product/269/32688#getkey $config->setKey("key"); $apiInstance = new TencentCloud\IM\Api\AccountApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $random = 56; // int | $accountCheckRequest = new \TencentCloud\IM\Model\AccountCheckRequest(); // \TencentCloud\IM\Model\AccountCheckRequest | //TODO: Set the request parameters try { $result = $apiInstance->accountCheck($random, $accountCheckRequest); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->accountCheck: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to https://console.tim.qq.com
Documentation For Models
- AccountCheckRequest
- AccountCheckRequestCheckItem
- AccountCheckResponse
- AccountDeleteRequest
- AccountDeleteRequestDeleteItem
- AccountDeleteResponse
- AccountImportRequest
- AddGroupMemberRequest
- AddGroupMemberRequestMemberList
- AddGroupMemberResponse
- AllowBannedObjectRequest
- BatchSendSingleChatMsgRequest
- BatchSendSingleChatMsgResponse
- BlackListAddRequest
- BlackListAddResponse
- BlackListCheckRequest
- BlackListCheckResponse
- BlackListDeleteRequest
- BlackListDeleteResponse
- BlackListGetRequest
- BlackListGetResponse
- ChangeGroupOwnerRequest
- ClearGroupAttrRequest
- CommonResponse
- CreateGroupRequest
- CreateGroupRequestMemberList
- CreateGroupResponse
- DefinedData
- DeleteGroupMemberRequest
- DeleteGroupMsgBySenderRequest
- DestroyGroupRequest
- ForbidCallbackControl
- ForbidIllegalObjectRequest
- ForbidSendMsgRequest
- FriendAddRequest
- FriendAddRequestAddFriendItem
- FriendAddResponse
- FriendCheckRequest
- FriendCheckResponse
- FriendDeleteAllRequest
- FriendDeleteAllResponse
- FriendDeleteRequest
- FriendDeleteResponse
- FriendGetListRequest
- FriendGetListResponse
- FriendGetRequest
- FriendGetResponse
- FriendImportRequest
- FriendImportRequestAddFriendItem
- FriendImportRequestCustomItem
- FriendImportResponse
- FriendUpdateRequest
- FriendUpdateRequestSnsItem
- FriendUpdateRequestUpdateItem
- FriendUpdateResponse
- GetAppInfoRequest
- GetAppInfoResponse
- GetAppidGroupListRequest
- GetAppidGroupListResponse
- GetC2cUnreadMsgNumRequest
- GetC2cUnreadMsgNumResponse
- GetCosSigRequest
- GetCosSigRequestRawURLs
- GetCosSigResponse
- GetGroupAttrRequest
- GetGroupAttrResponse
- GetGroupInfoRequest
- GetGroupInfoRequestResponseFilter
- GetGroupInfoResponse
- GetGroupMemberInfoRequest
- GetGroupMemberInfoResponse
- GetGroupShuttedUinRequest
- GetGroupShuttedUinResponse
- GetIPListRequest
- GetIPListResponse
- GetJoinedGroupListRequest
- GetJoinedGroupListRequestResponseFilter
- GetJoinedGroupListResponse
- GetNoSpeakingRequest
- GetNoSpeakingResponse
- GetOnlineMemberNumRequest
- GetOnlineMemberNumResponse
- GetOperateMsgHistoryRequest
- GetOperateMsgHistoryResponse
- GetRecentContactListGroupDeleteRequest
- GetRecentContactListGroupDeleteResponse
- GetRecentContactListGroupGetRequest
- GetRecentContactListGroupGetResponse
- GetRoamMsgRequest
- GetRoamMsgResponse
- GetRoleInGroupRequest
- GetRoleInGroupResponse
- GroupAddRequest
- GroupAddResponse
- GroupDeleteRequest
- GroupDeleteResponse
- GroupGetRequest
- GroupGetResponse
- GroupMsgGetSimpleRequest
- GroupMsgGetSimpleResponse
- GroupMsgRecallRequest
- GroupMsgRecallRequestMsgSeqList
- GroupMsgRecallResponse
- GroupType
- ImAddTagRequest
- ImGetAttrNameRequest
- ImGetAttrNameResponse
- ImGetAttrRequest
- ImGetAttrResponse
- ImGetTagRequest
- ImGetTagResponse
- ImPushRequest
- ImPushRequestCondition
- ImPushResponse
- ImRemoveAllTagRequest
- ImRemoveAttrRequest
- ImRemoveTagRequest
- ImRemoveTagRequestUserTags
- ImSetAttrNameRequest
- ImSetAttrRequest
- ImSetAttrRequestUserAttrs
- ImageInfo
- ImportGroupMemberRequest
- ImportGroupMemberRequestMemberList
- ImportGroupMemberResponse
- ImportGroupMsgRequest
- ImportGroupMsgRequestMsgList
- ImportGroupMsgResponse
- ImportGroupRequest
- ImportGroupResponse
- ImportMsgRequest
- KickRequest
- ModifyC2cMsgRequest
- ModifyGroupAttrRequest
- ModifyGroupAttrRequestGroupAttr
- ModifyGroupBaseInfoRequest
- ModifyGroupBaseInfoRequestAppDefinedData
- ModifyGroupMemberInfoRequest
- ModifyGroupMemberInfoRequestAppMemberDefinedData
- ModifyGroupMsgRequest
- MsgWithdrawRequest
- MultiAccountImportRequest
- MultiAccountImportResponse
- OfflinePushInfo
- OfflinePushInfoAndroidInfo
- OfflinePushInfoApnsInfo
- PortraitGetRequest
- PortraitGetResponse
- PortraitSetRequest
- PortraitSetRequestProfileItem
- PortraitSetResponse
- QueryOnlineStatusRequest
- QueryOnlineStatusResponse
- SendGroupMsgRequest
- SendGroupMsgResponse
- SendGroupSystemNotificationRequest
- SendMsgControl
- SendSingleChatMsgRequest
- SendSingleChatMsgResponse
- SetGroupAttrRequest
- SetMsgReadRequest
- SetNoSpeakingRequest
- SetUnreadMsgNumRequest
- TIMCustomElem
- TIMCustomElemMsgContent
- TIMFaceElem
- TIMFaceElemMsgContent
- TIMFileElem
- TIMFileElemMsgContent
- TIMImageElem
- TIMImageElemMsgContent
- TIMLocationElem
- TIMLocationElemMsgContent
- TIMMsgElement
- TIMSoundElem
- TIMSoundElemMsgContent
- TIMTextElem
- TIMTextElemMsgContent
- TIMVideoFileElem
- TIMVideoFileElemMsgContent
Documentation For Authorization
All endpoints do not require authorization.
Contact
腾讯云IM REST API SDK 技术交流QQ群
QQ群号:909322484