Use the Formant agent to authenticate API calls

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.

A Formant API endpoint with `device` as an authorized role.

A Formant API endpoint with device as an authorized role.

Step 1: Choose an API method which allows device as an authorized role

Review 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

Use 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].