I have a very simple curl command, this works for me (not using basic auth- the service just expects the token to be in URL):
curl -v -X POST https://Dkdjhf928hfDJFSDFJSK@sonarcloud.io/api/projects/create -d "name=sdfsdfsdf&project=sdfsdfdsf&organization=zzzzz"
This does not work:
Invoke-WebRequest -Method POST `
-Body 'name=sdfsdfsdf&project=sdfsdfdsf&organization=zzzzz' `
-Uri 'https://Dkdjhf928hfDJFSDFJSK@sonarcloud.io/api/projects/create'
powershell must be mangling something because I get this error:
Invoke-WebRequest : {"errors":[{"msg":"Insufficient privileges"}]}
Is there some default way curl sends body or data that powershell does not?