LogoLogo
Oswald
  • Release notes (EN)
  • Integration API (EN)
  • Advanced code responses (NL)
  • Functionele documentatie (NL)
  • What is the integration API
  • Authentication
  • Sending a message
  • Accessing message history
  • Forget session data
  • Widget integration
Powered by GitBook
On this page

Was this helpful?

Accessing message history

PreviousSending a messageNextForget session data

Last updated 5 years ago

Was this helpful?

If your integration can't or doesn't want to store the message history of your user with the chatbot, fetching it from Oswald again is possible.

The GET endpoint for this functionality is:

/chats/{id}/session/{session}/latest/{date}?types={types}&access_token={access_token}

The parameters in this call are:

Name

Type

Possible values

Description

id

string

fixed value per bot

The chatbot ID used to uniquely identify the chatbot. This value can be found in the Oswald UI url (see section )

session

string

any chosen unique identifier per conversation

The session identifies a unique conversation and can be chosen by your implementation. Note that the same ID of the implementation should be used.

date

string

any date string

The date string, formatted as DDMMYYYY, up until which the chat history must be fetched.

E.g. if we want all messages starting from the 31st of January 2019, the value of the datestring will be 31012019

types

comma separated list string

in

out

takeover

The types of messages we want to fetch from history.

  • in = User messages

  • out = Chatbot messages

  • takeover = Customer Service Agent messages

If you want to fetch all messages from history the types value should be in,out,takeover

access_token

string

unique chat API access token

The token that is used to authenticate with the chat API to validate the call. See section for more details.

The response of this GET call will be an array of chat objects described in section .

Sending a message
Sending a message
Authentication
Sending a message