Unable to create embed code for resource of workdrive using API
Hello Team,
I am trying to create embed code for a resource using workdrive api in powershell, however facing some issues with injecting data in body.
Please help, below is the code:
$ResourceID2= "1lmz0e40d0c92044629a7cd6e89fa54e"
# Define the headers for the POST request
$headers2 = @{
Authorization = "Zoho-oauthtoken $accesstoken"
Accept = "application/vnd.api+json"
}
$body2 = @{
resource_id = $ResourceID2
shared_type = "publish"
role_id = "34"
}
$link = Invoke-RestMethod -Method Post -Uri $url2 -Headers $headers2 -Body $body2
==================================================================
Invoke-RestMethod : {"errors":[{"id":"F000","title":"JSON_PARSE_ERROR"}]}
At line:16 char:9
+ $link = Invoke-RestMethod -Method Post -Uri $url2 -Headers $headers2 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Orchestly Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.