Site Resource API Terms & Conditions issue

27203

Hi, I'm using the Collaborate Rest API to get information about our data rooms, I'm iterating all the sites then running the following in a PowerShell script,

        $Params = @{
            Method      = "GET"
            Uri         = "datarooms.$$$$$$.com/.../$siteid"
            Headers     = $Header
        }

        $site = Invoke-RestMethod @Params 

This works with no issues until it gets to a site where I need to accept Terms & Conditions, then I get the following error,

Invoke-RestMethod : datarooms.$$$$$$.com/.../checkSiteSecurityTrustEntries.action
p;siteId=234566544Please accept the Terms & Conditions to access this site
At C:\Users\slp\Desktop\HighQ Collector v8.ps1:74 char:17
+         $site = Invoke-RestMethod @Params
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod

    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
 

Is there anyway to bypass the error or auto accept the Terms?

Thanks.

]]>
  • You need to contact support who can enable bypass T&Cs on the API - unfortunately it's global, so if you have users accessing features via the API then they won't need to agree to the terms and could still use the features.