tencent cloud

Chat

製品の説明
製品の概要
Basic Concepts
ユースケース
機能概要
アカウントシステム
ユーザープロフィールとリレーションシップチェーン
メッセージ管理
グループシステム
Official Account
Audio/Video Call
使用制限
購入ガイド
課金概要
価格説明
Purchase Instructions
Renewal Guide
支払い延滞説明
Refund Policy
ダウンロードセンター
SDK & Demo ソースコード
更新ログ
シナリオプラン
Live Streaming Setup Guide
AI Chatbot
極めて大規模なエンターテインメントコラボレーションコミュニティ
Discord実装ガイド
ゲーム内IM統合ガイド
WhatsApp Channel-style Official Account Integration Solution
Send Red Packet
Firewall Restrictions
クライアントAPIs
SDK API(Web)
Android
iOS & macOS
Swift
Flutter
SDK API(Electron)
SDK APIs (Unity)
SDK API(React Native)
C APIs
C++
サービス側 APIs
UserSigの生成
RESTful APIs
Webhooks
コンソールガイド
New Console Introduction
アプリケーションの作成とアップグレード
基本設定
機能設定
アカウント管理
グループ管理
Official Channel Management
コールバック設定
監視ダッシュボード
Viewing Guide for Resource Packages
Real-Time Monitor
補助ツールの開発
アクセス管理
Advanced Features
よくあるご質問
uni-app FAQs
 購入に関する質問
SDKに関する質問
アカウント認証に関する質問
ユーザープロファイルとリレーションシップチェーンに関する質問
メッセージに関する質問
グループに関する質問
ライブ配信グループに関する質問
ニックネームプロフィール画像に関連した問題
一般的なリファレンス
Service Level Agreement
セキュリティコンプライアンス認証
IM ポリシー
プライバシーポリシー
データプライバシーとセキュリティ契約
エラーコード
お問い合わせ

Setting User Attributes

PDF
フォーカスモード
フォントサイズ
最終更新日: 2025-10-23 10:58:09

Feature Overview

This API is used by the admin to set attributes for users. Each request can set attributes for a maximum of 100 users. Before using this API, be sure to set app attribute names.

API Calling Description

Pushing to all users is available only to the Pro edition 、Pro Plus edition、Enterprise edition. To use it, you need to purchase the Pro edition 、Pro Plus edition、Enterprise edition, go to the console, choose Feature Configuration > Login and Message > Push to all users, and enable the feature.

Sample request URL

https://xxxxxx/v4/all_member_push/im_set_attr?usersig=xxx&identifier=admin&sdkappid=88888888&random=99999999&contenttype=json

Request parameters

Parameter
Description
https
The request protocol is HTTPS and the request method is POST.
xxxxxx
Domain name corresponding to the country/region where your SDKAppID is located.
China: console.tim.qq.com
Singapore: adminapisgp.im.qcloud.com
Seoul: adminapikr.im.qcloud.com
Tokyo:adminapijpn.im.qcloud.com
Frankfurt: adminapiger.im.qcloud.com
Silicon Valley: adminapiusa.im.qcloud.com
Jakarta: adminapiidn.im.qcloud.com
v4/all_member_push/im_set_attr
Request API
usersig
Signature generated in the app admin account. For more information, see Generating UserSig.
identifier
The app administration account.
sdkappid
SDKAppID assigned by the Chat console when an app is created
random
A random 32-bit unsigned integer
contenttype
The value is always json.

Maximum call frequency

100 times/second

Sample request

{
"UserAttrs":
[
{
"To_Account": "xiaojun012",
"Attrs": {
"sex": "attr1",
"city": "attr2"
}
},
{
"To_Account": "xiaojun013",
"Attrs": {
"city": "attr3",
"sex": "attr4"
}
}
]
}

Request fields

Field
Type
Required
Description
To_Account
String
Yes
Target user account
Attrs
Object
Yes
Attribute set. Each attribute is a key-value pair, with the key being the attribute name and the value being the user’s corresponding attribute value. A user attribute value cannot exceed 50 bytes.

Sample response

{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0
}

Response fields

Field
Type
Description
ActionStatus
String
Request result. OK: Successful. FAIL: Failed
ErrorCode
Integer
Error code
ErrorInfo
String
Error information

Error Codes

Unless a network error (such as error 502) occurs, the HTTP return code for this API is always 200. ErrorCode and ErrorInfo in the response represent the actual error code and error information. For public error codes (60000 to 79999), please see Error Codes. The following table describes the error codes specific to this API:
Error Code
Description
90001
Failed to parse the JSON format. Check whether the JSON request meets JSON specifications.
90009
The request requires app admin permissions.
90018
The number of requested accounts exceeds the limit.
90033
Invalid attribute.
91000
Internal service error. Try again.

API Debugging Tool

Use the RESTful API online debugging tool to debug this API.

References

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック