How to debug cloud API issues when using External Registrations?
Issue Description: How to debug cloud API issues?
Diagnosing/Resolving
- Capture the Application Registration in cloud.uipath.com. See Managing External Applications - Adding An External Application
- After navigating to the external registrations page, find the specific external registration being used
- Select the edit icon and take a screenshot of all the details.
- UiPath will need this to verify the input parameters being used by the application. Here is an example:
- Capture how the request is being made.
- If using powershell, provide a sample of the powershell code.
- If using postman provide the input configuration.
- In the case of Postman, it is also helpful to gather the har logs: How To Get Logs From The Postman - Desktop App
- If using a local application, try gathering a fiddler trace: How To Use Fiddler To Debug An Issue?
- If using a third party application that does not run locally (for example an integration with service now) just gather the configuration being used in that application. UiPath would want to see what input parameters are being gathered.
- After the above information is gathered, open a ticket with UiPath and provide the above information. This information allows verification if the requests are being made correctly.
- Here are some additional resources:
- Accessing UiPath Resources Using External Applications
- UiPath uses the well known standard called OAuth2.0. The flows for this standard are published in RFCs (these are global standards for the internet, that we have to comply with when implementing OAuth2.0)
- For Authorization Flow: Read more on Authorization Code Grant
- For Authorization Flow with PKCE: Read more on Protocol Flow
- For Client Credentials: Read more on Client Credentials Grant
- In general, if trying to implement code to make API calls, its recommended to use an OAuth2.0 library in your code. Doing a manual implementation is likely to result in frustrating errors by way of mis-implementation. A list of libraries can be found here: https://oauth.net/code/
- Finally, postman can be a good way to learn how the API calls are made.
- Postman only requires specific fields are provided for each type of OAuth2.0 flow. It then uses those fields to correctly make the request.
- For how to authorize a request in postman see: Postman - Sending Requests / Authorization
- Testing using postman can be a good sanity check to see if the issue is with the custom implementation or with UiPath.
- Finally, if the API call is working with postman, generating a HAR trace or looking at the console logs can help clarify how to correctly make the API call.
- For more details on Postman and making API calls to cloud, see: https://www.postman.com/uipath .