How to use CURL for querying the API with password?

I found the right steps to do just the above, here: