API endpoints with an authorized user of device
can authenticate calls using the agent. This is accomplished using the call_cloud()
method of the Agent SDK.
Step 1: Choose an API method which allows device
as an authorized role
device
as an authorized roleReview the list of API endpoints in our API reference. Methods with device
as an authorized role can use the Formant agent for authentication.
Step 2: Use the call_cloud()
method
call_cloud()
methodUse the Agent SDK's call_cloud()
method to call the API method. You can set the require_formant_auth
parameter to enforce authorization or use the Formant agent as the source of authentication.
See the Agent SDK reference for full syntax and parameters of the
call_cloud()
method.
You can find an example on our GitHub page: GitHub:
post_device_authenticated_cloud_call.py
.
If you're having trouble authenticating with the agent, try updating your agent and your Python SDK.
If you notice an issue with this page or need help, please reach out to us! Use the 'Did this page help you?' buttons below, or get in contact with our Customer Success team via the Intercom messenger in the bottom-right corner of this page, or at [email protected].