API

Common

Getting Started

User

Register New User
Login
Logout
Refresh Access Token
Get User Profile
Update Profile
Upload Avatar
Delete User
Reset Password
Reset Password by ID

User Token

List User Tokens
Add User Token
Update Default User Token
Delete User Token
Verify User Token
Reset Verification Code

User vAtom

Get vAtom
Get vAtoms by Ids
Get vAtom Inventory
Search vAtoms
Geo Discover Groups
Geo Discover vAtoms
Update vAtoms
Perform Action
Trash vAtom

User Activity

Get My Threads
Get My Thread Messages

Template

List Templates
Get Template
Create Template
Update Template
Delete Template

Template Variation

List Variations
Get Variation
Create Variation
Update Variation
Delete Variation

vAtom

Emit vAtom

Template Action

List Actions
Get Action
Register Action Handler
Register Action
Update Action
Delete Action

Template Face

List Faces
Register Face
Update Face
Delete Face

Asset

Upload Assets
Get Assets
Delete Assets

Get My Thread Messages

POST
https://api.blockv.io/v1/activity/mythreadmessages

Overview

This request returns event messages in a thread belonging to the current user starting with the most recent one. Each thread can contain a number of event messages.

Get My Thread Messages Request

HTTP Headers

Content-Type: application/json App-Id: {app_id}

Payload Details

NameTypeDescription
name * stringThread identifier.
cursorstringAllows you to filter out all messages more recent than the cursor (e.g. for paging). If omitted, the most recent messages are returned.
countintDefines the maximum number of messages to be returned. If omitted, all matching messages are returned.

Sample Request

{ 
 "name": "76e0d5ba-b97d-43d0-87b2-72f15f8a0ab3:824ae003-ac9d-4159-9621-a3221360cc38",
 "count": 2 
}

Get My Thread Messages Response

Return & Error Codes

ErrorTypeDescription
200httpEverything is OK
400httpInvalid request
401httpAuthorization token missing
403httpUnauthorized or missing thread name

Payload Object

NameTypeDescription
cursorstringValue that can be used in the next request for paging.
messagesarrayList of event messages.

Event Object

NameTypeDescription
messageobjectThe event message.
when_modifiedintTimestamp of the last modification.

Message Object

NameTypeDescription
msg_idintMessage identifier.
user_idstringIdentifier of the other user involved.
vatomsarrayList of identifiers of the vAtoms involved.
templ_varsarrayTemplate variation names for each of these vAtoms.
msgstringMessage text.
action_namestringName of the action that caused the event.
when_createdstringDate and time when the event happened.
triggered_bystringIdentifier of the user who triggered the action.
genericarrayList of resources.
geo_posarrayGeo position (longitude, then latitude) of the current user at the time of the event.

Sample Response

{
    "payload": {
        "cursor": "1.523280543853133e+18",
        "messages": [
            {
                "message": {
                    "msg_id": 1523280568449439009,
                    "user_id": "76e0d5ba-b97d-43d0-87b2-72f15f8a0ab3",
                    "vatoms": [
                        "ab8aa7a5-7056-4fd0-912e-976971fd1695"
                    ],
                    "templ_vars": [
                        "vatomic.prototyping::3D-Object::Key"
                    ],
                    "msg": "You sent <b> </b> a <b>Secret Key</b> vAtom.",
                    "action_name": "Transfer",
                    "when_created": "2018-04-09T13:29:28Z",
                    "triggered_by": "824ae003-ac9d-4159-9621-a3221360cc38",
                    "generic": [
                        {
                            "name": "ActivatedImage",
                            "resourceType": "ResourceTypes::Image::JPEG",
                            "value": {
                                "resourceValueType": "ResourceValueType::URI",
                                "value": "https://cdndev.blockv.net/vatomic.prototyping/vatomic.prototyping::v1::vAtom::3D-Object/key_card.jpg"
                            }
                        }
                    ],
                    "geo_pos": [
                        17.0333,
                        51.1
                    ],
                    "to_data_lake": true,
                    "no_message": false
                },
                "when_modified": 1523280568449438976
            },
            {
                "message": {
                    "msg_id": 1523280543853132973,
                    "user_id": "76e0d5ba-b97d-43d0-87b2-72f15f8a0ab3",
                    "vatoms": [
                        "670eedc1-f83c-4ffe-8e0f-9471f784be9f"
                    ],
                    "templ_vars": [
                        "vatomic.prototyping::CouponCard::Harvelles"
                    ],
                    "msg": "<b> </b> sent you a <b>Free Drink</b> vAtom.",
                    "action_name": "Transfer",
                    "when_created": "2018-04-09T13:29:03Z",
                    "triggered_by": "824ae003-ac9d-4159-9621-a3221360cc38",
                    "generic": [
                        {
                            "name": "ActivatedImage",
                            "resourceType": "ResourceTypes::Image::PNG",
                            "value": {
                                "resourceValueType": "ResourceValueType::URI",
                                "value": "https://cdndev.blockv.net/vatomic.prototyping/vatomic.prototyping::v1::vAtom::CouponCard/harvelles_icon.png"
                            }
                        }
                    ],
                    "geo_pos": [
                        17.0333,
                        51.1
                    ],
                    "to_data_lake": false,
                    "no_message": false
                },
                "when_modified": 1523280543853133056
            }
        ]
    }
}
©2020 BLOCKv
Info