Lista de eventos

En este fragmento de código aprenderá a listar Eventos.

Ejemplo

Asegúrese de que las siguientes variables se ajustan a los valores requeridos utilizando cualquier método conveniente:

ClaveDescripción
CONVERSATION_ID

The ID of the Conversation.

Requisitos previos

You will need to use an existing Application that contains a Conversation in order to be able to create Events and then list them. See the Create Conversation code snippet for information on how to create an Application and some sample Conversations.

Escriba el código

Añada lo siguiente a list-events.sh:

curl "https://api.nexmo.com/v1/conversations/$CONV_ID/events" \
     -H 'Authorization: Bearer '$JWT\
     -H 'Content-Type: application/json'

Ver fuente completa

Ejecute su código

Guarde este archivo en su máquina y ejecútelo:

bash list-events.sh

Pruébalo

Cuando ejecute el código obtendrá una lista de Eventos.