In some architectures, the Smooch app creation API cannot be called directly by an application as this would require sharing account credentials with an untrusted party.
This project demonstrates a serverless function for creating apps and associated access keys without exposing the superuser account credentials to the untrusted party.
To deploy:
- Set the relevant account key, account secret and authCode values in serverless.yml.
authCode
is a unique string you define for securing access to this API. If it is compromised, anyone will be able to provision Smooch apps on your account. However, no data will be lost or accessible. npm install
serverless deploy
- POST to the
/apps/create
endpoint with an appname
andauthCode
specified in the query string.
NOT PRODUCTION QUALITY - POC ONLY