Bold360 and BoldChat Developer Center

Retrieve chat transcript data

This pseudocode example iterates over chat messages and retrieves the transcript data.

Note: The getAllChatMessages and getChat methods correspond to the following cURL commands:
Method cURL command
getAllChatMessages
curl "https://api.boldchat.com/aid/$accountId/data/rest/json/v1/getAllChatMessages?auth=$authHash"
getChat
curl "https://api.boldchat.com/aid/$accountId/data/rest/json/v1/getChat?ChatID=$chatID&auth=$authHash"
Note: Replace $chatID with the ID of the chat you want to query.
parameters = date range
Do
{
    if allMessages has value
        parameters = allMessages.Next
        allMessages = getAllChatMessages(parameters)
        foreach message in allMessages
        {
        if don’t have message.ChatID stored
        {
            Chat = getChat(message.ChatID)
            save chat data
        }
        add message to transcript data
    }
} while allMessages.Next is not null