
ghanna228715 (Community Member) asked a question.
I am using this, which works for all of the other API calls that I've tried, but does not work for uploadfile.do:
$pwd = ConvertTo-SecureString $apiUserPassword -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential ($apiUser, $pwd)
$postParams = @{app_id=$applicationId;sandbox_id=$sandboxId;file="@"+$zipOutputFile}
$response = Invoke-WebRequest https://analysiscenter.veracode.com/api/5.0/uploadfile.do -Method POST -Credential $cred -Body $postParams
.png)
Update: 12/07/2020
With the HMAC authentication in place right now, please refer to the latest codes samples below, which demonstrate the use of HMAC authentication with Power Shell. https://github.com/rafaelzm2000/Veracode_HMAC_Auth/blob/master/Veracode_HMAC256.ps1