API access communications Mining

A client has communications mining enabled, and now want to enter the service via API.
In The UiPath cloud I have created an application - confidential with client_id and client_secret.

Using postman I succesfully get a bearer token via https://cloud.uipath.com/identity_/connect/token

However, when using any valid endpoint (according to UiPath documentation) the return message is always:

{ "status": "error", "message": "Invalid authentication token in request"}

So most likely I’m missing some authorization option.
In the application registration I can add scopes, but there are no specific scopes available for communication mining.

Anybody has some experience with this?

Try using instead of access_token from an external application your Personal Access Token from an user which has the necessary permissions on the target UiPath Application.

The Header will have this format:

Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN

More details on Automation Cloud - Personal Access Tokens

@Jeroen_van_Loon

you need to use the api token from comms mining page…

on comms mining → administration → my account → API key

if you dont see reach out to your admin, ideally you should be able to

details are here

cheers

I’ll give it a try, but I also want to know how to connect from an application instead of a user account with a PAT. Users come and go, and the goal is to intergrate CM with an external application.

@Jeroen_van_Loon

The above given steps are not for personal access token…you can try those

Cheers

But it is still an API token linked to a user account.

@Jeroen_van_Loon

Thats is the way currently

Even bot user can have the same

Personal access token is different from this

Cheers

Ok, so safe to conclude it needs to be an access token from within the CM module, and not a registered application with client/secret, making it impossible to create system access.
If I were to use this API token to integrate CM with an external app, it is completely dependent on my existence or whichever user account is used) for the integration. Offboarding a user kills the integration then.

Nonetheless, thanks for this input. I can at least proceed.
But @UiPath: this is hardly a sustainable setup. Please combine the API sets with the regular access ones for all other service. Something to do with consistency. I’m aware CM was ‘aquired’ and still leans on non-UiPath interfaces but put it on a backlog somwhere please.

@Anil_G I’ll mark you as solution as soon as I’ve been able to test it (after Easter).

1 Like

@Jeroen_van_Loon

one reason was to preserve the secure data as it might contain some restrcited data as well..But hope your request would be considered

cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.