I want to create an ivr flow and configuration completely from api ( not from the architect ). I checked the API's in Architect API Resources and there is an api for creating a flow to which flow configuration uri has to be passed but the problem is I can't find any api to add a flow configuration
There isn't a public REST api for creating flow configurations, however this Node scripting library will generate a flow configuration and publish the flow.
Thanks. I tried it out and It did not work when tried to authenticate with a client credentials token but worked perfectly with a user token. In my case I want to use client credentials token because I will be refreshing the token from a cron job instead of forcing the user to login when token expires.
So Is there any way to access the scripting library using a client credentials token?
The client/secret startup method is for 'code authorization' Oauth, which is user interactive (a web browser is opened). There isn't built-in support for client credentials, but you can implement that separately in a small method (it's fairly simple) and pass the token into the StartWithAuthToken method. A client credentials token will work with this library*, there just isn't support for starting up with the client credentials client and secret yet.
* assuming the oauth client has role with proper permissions assigned.
When I tried calling StartWithAuthToken with the client credentials token the error that I'm getting is ERROR! error getting user:. Is it because my oauth client doesn't have proper permission? Oauth client right now has the admin role.
PS : Apart from the documentation are there any examples or sample codes for the flow scripting sdk. That would really help me out!
Hello, the Node package should come with some example scripts - I uploaded them here.
With Client Credentials there are endpoints that will not work, such as /users/me. Such endpoints require user context, and with client credentials there is no logged in user. Endpoints for analytics, managing flows, and other org-level configurations will work if the proper permissions are in a Role assigned to the OAuth client.
Thank you so much for the examples. That's exactly what I was looking for
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.