User Activity

Access the latest user activity within a Conversation

OpenWeb captures the activity of a user, such as comments and responses within a Conversation. The User Activity API enables a developer to access this information.



Retrieve user activity

/v1/user/activity
Shows the activity of a user that a developer can expose within a native user profile

📘

To use this API, request that it be enabled for your Spot ID from your OpenWeb PSM.


Request

curl -L -X POST 'https://api.openweb.com/v1/user/activity' \
     -H 'x-spot-id: SPOT_ID' \
     -H 'EXPORT_TOKEN' \
     -H 'Content-Type: application/json' \
     -d '{"profile_user_id": "PROFILE_USER_ID","count": 5,"offset": 0}'

Header Parameters

Parameter Description
apikey string Unique OpenWeb export token

  1. From your OpenWeb Admin Dashboard, click Settings.
  2. Under Authentication Tokens, copy the Export value.
x-spot-id string Unique OpenWeb identifier for your property

  1. Log into your Admin Dashboard.
  2. Copy your Spot ID from the URL: https://admin.spot.im/spot/{SPOT_ID}/...


Body Parameters

Parameter Description
count number Number of items to return
offset number Position in the dataset of the starting item to return
profile_user_id string OpenWeb user ID


Response

{
    "cursor": {
        "offset": 1,
        "count": 1,
        "has_next": false
    },
    "items": [{
        "data": {
            "spot_id": "SPOT_ID",
            "conversation_id": "CONVERSATION_ID",
            "conversation": {
                "url": "CONVERSATION_URL",
                "type": "link",
                "title": "ARTICLE_TITLE,
                "width": 2000,
                "height": 1333,
                "service": "og",
                "metadata": {},
                "description": "ARTICLE_DESCRIPTION",
                "thumbnail_url": "THUMBNAIL_URL"
            },
            "messages": [{
                "root_comment": "ROOT_COMMENT_ID",
                "parent_id": "",
                "depth": 0,
                "id": "COMMENT_ID",
                "user_id": "USER_ID",
                "written_at": 1606053078,
                "time": 1606053078,
                "replies_count": 0,
                "offset": 0,
                "has_next": false,
                "edited": false,
                "status": "approved",
                "rank": {
                    "ranks_up": 0,
                    "ranks_down": 0,
                },
                "replies": [],
                "content": [{
                    "id": "CONTENT_ID",
                    "text": "MESSAGE_TEXT",
                    "type": "text"
                }],
                "deleted": false,
                "published": true,
                "rank_score": 0,
                "type": "comment",
                "metadata": {
                    "previous_state": "approved"
                },
                "flags": null,
                "featured": false,
                "top_featured": false
            }]
        }
    }],
    "users": {
        "USER_ID": {
            "id": "USER_ID",
            "display_name": "DISPLAY_NAME",
            "image_url": "",
            "user_name": "USER_NAME",
            "registered": true,
        }
    }
}


Response Parameters

Parameter Description
cursor object Summary of API response

See: cursor object
items array Information about the Conversation and messages made in the Conversation

See: items object
users object Information about the user

See: users object

cursor object
Parameter Description
count number Number of items returned
has_next boolean Indicates if the user has more messages that have not been included in the response
offset number Position in the dataset of the starting item to return

items object
Parameter Description
data object Information about the article and associated messages

See: items.data object

items.data object
Parameter Description
conversation object Information about the Conversation, such as the following:
  • Description
  • Dimensions
  • Thumbnail URL
  • Title
  • URL
conversation_id string Unique identifier for the Conversation
messages array Information about messages made in a specific Conversation, such as the following:
  • Approval status
  • Message ID
  • Replies count
  • Timestamp of message
spot_id string Unique OpenWeb identifier for your property

users.{user_id} object
Parameter Description
display_name string Non-unique personal identifier used prominently throughout the platform
id string Unique ID for the user
image_url string URL of the profile image of the user
registered boolean Registration status of the user

Possible values:
  • false: Unregistered user
  • true: Registered user
user_name string Unique personal identifier used to differentiate between different users