VERTABELO_API_TOKEN via Invoke-WebRequest in powershell

Ugo Peltier 3 years ago updated by Rafał Strzaliński (Senior Engineer) 3 years ago 2

Any idea how to pass VERTABELO_API_TOKEN via Invoke-WebRequest in powershell ?

I cannot pass a credential with an empty pass, fails because pass cannot be empty.

I cannot pass my user/password instead,"no permission" message from website.

tried to pass it as POST ?VERTABELO_API_TOKEN=xxx, fails too.

curl equivalent queries worked.



I'm not familiar with PowerShell. If the password cannot be empty,  you may put anything as a password. 

Here is a curl equivalent.

curl -u ${VERTABELO_API_TOKEN}:something -H "Accept: application/json" https://my.vertabelo.com/drive