Obtener un evento

En este fragmento de código aprenderás a obtener un Evento.

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.

EVENT_ID

The unique ID of the Event

Requisitos previos

You will need to use an existing Application that contains a Conversation in order to be able to create an Event and then retrieve details for one. 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 get-event.sh:

curl "https://api.nexmo.com/v1/conversations/$CONV_ID/events/$CONV_EVENT_ID" \
     -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 get-event.sh

Pruébalo

Cuando ejecute el código obtendrá el Evento especificado.