Hi All,
I am fairly new to RPA development and a complete novice at APIs. However, what I need to do is fairly simple and I am hoping you guys will be able to help me.
I am trying to create a robot for an internal process. I need to get list items (values in a particular column) from a SharePoint online list.
I tried the REST API URL directly in the browser and it works when I am signed into SP Online.
I am trying to do the same now with the UiPath HTTP request activity.
However, I am having trouble setting up the request builder.
I don’t know how to setup the authentication for an API.
The request URL is as below:
https://<Company>.sharepoint.com/sites/LostPackages/_api/web/lists/getbytitle('LostPackagesDB')/items?select=<ColumnName>
This URL works when I directly paste it the browser when I am signed in on SP Online.
However, when I try it with UiPath HTTP Request Activity, I get the following error:
<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<m:code>-2147024891, System.UnauthorizedAccessException</m:code>
<m:message xml:lang="en-US">Attempted to perform an unauthorized operation.</m:message>
</m:error>
Can someone please help me with setting up one of the Authentication methods and the query.
I tried the Simple HTTP authentication with my username and password but got the same error.
So now it looks like I either need to use the OAuth1 or the OAuth2 authentication method. And I how no idea on how to do either. Some guidance on how to setup the authentication for either of the 2 methods would be really appreciated.
Best Regards,
Achal Desai