PackeTsar / freeztp

An Open-Source Zero-Touch Provisioning System for Cisco IOS.
GNU General Public License v3.0
214 stars 28 forks source link

Permanent API-KEY or workaround for Spark integration #48

Closed nstamoul closed 5 years ago

nstamoul commented 5 years ago

It is a known fact that the webex teams API-key expires after 12 hours. This limits the integration's functionality and I am searching for a permanent solution.

I tried editing the /bin/ztp file in order to use Incoming Webhooks App (https://apphub.webex.com/integrations/incoming-webhooks-cisco-systems) but my limited coding skills got me nowhere. Furthermore I don't really know if this is a viable solution since I am not sure you can send file attachments with Incoming Webhooks.

So is there a permanent solution? Is something on the roadmap?

PackeTsar commented 5 years ago

The solution here is to use a bot. A bot should have a perpetual API key. This is what I have been using in my deployments and it has worked well. Once you register a bot, you will need to invite it to a space. Then use the request integration-setup (or something like that) command to input the API key and pick which space ZTP should send messages.

nstamoul commented 5 years ago

The bot works just fine. Thank you for your quick response.

PackeTsar commented 5 years ago

No problem. Thanks for the feedback.