tencent cloud

Feedback

Obtaining User Attributes

Last updated: 2024-07-23 18:06:24

    Feature Overview

    This API is used by the administrator to obtain user attributes. Up to 100 users' attributes can be obtained at a time. To call this API, you need to set application attribute names first.

    Sample Request URL

    https://xxxxxx/v4/timpush/get_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
    The dedicated domain name corresponding to the country/region of the SDKAppID.
    China: console.tim.qq.com
    Singapore: adminapisgp.im.qcloud.com
    Seoul: adminapikr.im.qcloud.com
    Frankfurt: adminapiger.im.qcloud.com
    Silicon Valley: adminapiusa.im.qcloud.com
    Jakarta: adminapiidn.im.qcloud.com
    v4/timpush/get_attr
    Request API.
    usersig
    The signature generated by the app admin account. For details, see Generating UserSig.
    identifier
    The app admin account.
    sdkappid
    The SDKAppID assigned by the Chat console when an application is created.
    random
    A random 32-bit unsigned integer.
    contenttype
    The value is always json.

    Maximum Call Frequency

    100 times/second

    Sample Request Packets

    {
    "To_Account": [
    "Jack",
    "Daved",
    "abc"
    ]
    }

    Request Fields

    Field
    Type
    Required
    Description
    To_Account
    Array
    Yes
    List of target user accounts.

    Sample Response Packets

    {
    "ActionStatus": "OK",
    "ErrorInfo": "",
    "ErrorCode": 0,
    "UserAttrs": [
    {
    "To_Account": "Jack",
    "Attrs": {
    "sex" : "Female",
    "city": "New York"
    }
    },
    {
    "To_Account": "abc",
    "Attrs": {}
    },
    {
    "To_Account": "Daved",
    "Attrs": {
    "sex": "M",
    "city": "Shenzhen"
    }
    }
    ]
    }

    Response Fields

    Field
    Type
    Description
    ActionStatus
    String
    Processing result. OK: succeeded. FAIL: failed.
    ErrorCode
    Integer
    Error code.
    ErrorInfo
    String
    Error information.
    UserAttrs
    Array
    List of user attributes.
    To_Account
    String
    User account.
    Attrs
    Object
    Attribute content.

    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 packets represent the actual error code and error information. For common error codes (60000 to 79999), 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 request packets meet JSON specifications.
    90018
    The number of requested accounts exceeds the limit.
    91000
    Internal service error. Try again.

    API Debugging Tool

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

    References

    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support