Ejecución de servicios REST
Cómo ejecutar una API REST desde el chatbot
GET
<action
type="rest-api"
key="state.rest_api_response"
endpoint="https://dominio"
verb="get"
headers="{'Accept': 'application/json', 'Authorization': 'Bearer {{state.token}}'}"
params="{'param1_key': 'param1_value'}"
timeout="10"
/> {
"body": {},
"status": ""
}<action type="reply" with_text="Elegiste la cuenta {{state.rest_api_response.body.account_number}}"/>POST
Última actualización