how to encode password in curl code example Example: basic authentication bash $ echo -n user:password | base64