Eloqua Upload Image API Error In Powershell
Hi I'm trying to upload an image to Eloqua using the upload image API endpoint: /api/REST/1.0/assets/image/content .
When building this request in postman everything works fine and I'm able to upload the Image without problems. However when I use the Powershell script that Postman provides I cannot get the post to work and continue to run into this error:
[{"type":"FileError","requirement":{"type":"SizeRequirement","maxSize":52428800,"minSize":1}}]
Here is my code with the removal of a valid bearer token:
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Accept", "application/json")
$headers.Add("Authorization", "Bearer -------")
$multipartContent = [System.Net.Http.MultipartFormDataContent]::new()
Tagged:
0