I am trying to setup chatops using the Cisco Spark (Webex Teams) plug. After about 30 seconds Hubot dies with the following.
[Tue Jul 30 2019 12:02:32 GMT-0400 (Eastern Daylight Time)] ERROR BadRequest: The user has sent too many
requests in a given amount of time. Please refer to the Retry-After response header to wait before
making a new request.
undefined https://api.ciscospark.com/v1/messages
WEBEX_TRACKING_ID: spark-js-sdk_*******
at BadRequest.ExtendableBuiltin (/opt/stackstorm/chatops/node_modules/@ciscospark/common/dist/exception.js:50:44)
at BadRequest.Exception (/opt/stackstorm/chatops/node_modules/@ciscospark/common/dist/exception.js:99:142)
at BadRequest.HttpError (/opt/stackstorm/chatops/node_modules/@ciscospark/http-core/dist/http-error.js:70:125)
at BadRequest.SparkHttpError (/opt/stackstorm/chatops/node_modules/@ciscospark/spark-core/dist/lib/spark-http-error.js:48:135)
at new BadRequest (/opt/stackstorm/chatops/node_modules/@ciscospark/http-core/dist/http-error-subtypes.js:64:129)
at HttpStatusInterceptor.onResponse (/opt/stackstorm/chatops/node_modules/@ciscospark/http-core/dist/interceptors/http-status.js:99:39)
at /opt/stackstorm/chatops/node_modules/@ciscospark/http-core/dist/request/index.js:72:41
at process._tickCallback (internal/process/next_tick.js:68:7)
[Tue Jul 30 2019 12:02:32 GMT-0400 (Eastern Daylight Time)] ERROR BadRequest: The user has sent too many
requests in a given amount of time. Please refer to the Retry-After response header to wait before
making a new request.
undefined https://api.ciscospark.com/v1/messages
WEBEX_TRACKING_ID: spark-js-sdk_*********
at BadRequest.ExtendableBuiltin (/opt/stackstorm/chatops/node_modules/@ciscospark/common/dist/exception.js:50:44)
at BadRequest.Exception (/opt/stackstorm/chatops/node_modules/@ciscospark/common/dist/exception.js:99:142)
at BadRequest.HttpError (/opt/stackstorm/chatops/node_modules/@ciscospark/http-core/dist/http-error.js:70:125)
at BadRequest.SparkHttpError (/opt/stackstorm/chatops/node_modules/@ciscospark/spark-core/dist/lib/spark-http-error.js:48:135)
at new BadRequest (/opt/stackstorm/chatops/node_modules/@ciscospark/http-core/dist/http-error-subtypes.js:64:129)
at HttpStatusInterceptor.onResponse (/opt/stackstorm/chatops/node_modules/@ciscospark/http-core/dist/interceptors/http-status.js:99:39)
at /opt/stackstorm/chatops/node_modules/@ciscospark/http-core/dist/request/index.js:72:41
at process._tickCallback (internal/process/next_tick.js:68:7)
[Tue Jul 30 2019 12:02:32 GMT-0400 (Eastern Daylight Time)] INFO Hubot will shut down
The interesting things is that I wrote a script to try sending messages directly to the API and I was able to send 100 as fast as it could execute. Is their a setting for the Spark plugin that needs to be adjusted?