Skip to main content

Uniphore Help Center Portal

Authentication

Conversation Insights Agent API uses M2M tokens for authentication. For each tenant, an M2M token is created in Auth0 and shared with the respective users. The token is generated by encoding your tenantId. The API extracts the tenandId from the token to process requests and extract corresponding results.

How to get M2M token?
  1. Raise an E-Support ticket to the Conversation Insights Agent team to obtain Client ID and Client Secret.

  2. You will receive Client ID, Client Secret, and a cURL command.

  3. Execute the cURL command, and you will get the M2M token in response.

  4. Use this Conversation Insights AgentM2M token to execute APIs.

Note

M2M token is valid only for 30 minutes.

Sample Request
curl --location 'https://<host name>.auth0.com/oauth/token'\
--header 'content-type: application/json' \
--header 'Cookie: did=s%3Av0%3Abff635c0-7342-4f06-ae6d-c9bf0e5e09cd.0v06xG7igGEbt7TbAHpY5kDDQG5nmHZNwTRz3q6VldI; did_compat=s%3Av0%3Abff635c0-7342-4f06-ae6d- did_compat=s%3Av0%3Abff635c0-7342-4f06-ae6d-c9bf0e5e09cd.0v06xG7igGEbt7TbAHpY5kDDQG5nmHZNwTRz3q6VldI' \
--data'{
        "client_id":"PXvYn4hxB8UNUR",
        "client_secret":"53xNwMGu65zRKxCvNhl8pW",
        "audience":"api.uniphore.com",
        "grant_type":"client_credentials"}'
Sample Response
{
    "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IlwaG9yZS5jb20vc3RyYXRvciJdLCJodHRwczoYW50IjoiMTViYjEwN2UtMGM1Yi00NGJlLTg0ZTEtNWYyNzYxMTE1ODNhIiwiaHR0cHM6Ly9hcGkudW5pcGhvcmUuY29tL29yZ19pZCI6Im9yZ19FQlVLRmVlWHFvbXdpYU8xIiwiaXNzIjoiaHR0cHM6Ly9kZXYtZzJqNW11MnoudXMuYXV0aDAuY29tLyIsInN1YiI6InRKYXZQUlcyYWlNcVBYdlluNXhVM3VuNGh4QjhVTlVSQGNsaWVudHMiLCJhdWQjb3BlIjoicmVhZDp0ZW5hbnRzIHJlYWQ6dXNlcnMgd3JpdGU6dXNlcnMiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMiLCJhenAiOiJ0SmF2UFJXMmFpTXFQWHZZbjV4VTN1bjRoeEI4VU5VUiIsInBlcm1pc3Npb25zIjpbInJlYWQ6dGVuYW50cyIsInJlYWQ6dXNlcnMiLCJ3cml0ZTp1c2VycyJdfQ.whWKj8hREXZfns5oblhYW71sIEbzNVWPihR-2AY4k84JiWR6KLbe7hedKZ8oX6fJ9MIxdNbeCbJYYPkx5G31c49reF4U27Suo54RsYMvACFchjWBD-_B5cWMprmu1FGaZpXQWOSDzLqc6p9iJNmjHciu6nL_RAU1s-u703RpdgDnmWEVg",
    "scope": "read:tenants read:users write:users",
    "expires_in": 86400,
    "token_type": "Bearer"
}