You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

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:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!