holli@DESKTOP-46NMP4B:~$ curl -v -X POST -i -u "apikey:xxx" --header "Content-Type: audio/flac" --data-binary x.flac "https://stream-fra.watsonplatform.net/speech-to-text/api/v1/recognize" Note: Unnecessary use of -X or --request, POST is already inferred. * Trying 158.177.93.238... * TCP_NODELAY set * Connected to stream-fra.watsonplatform.net (158.177.93.238) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs * TLSv1.2 (OUT), TLS handshake, Client hello (1): * TLSv1.2 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server key exchange (12): * TLSv1.2 (IN), TLS handshake, Server finished (14): * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): * TLSv1.2 (OUT), TLS change cipher, Client hello (1): * TLSv1.2 (OUT), TLS handshake, Finished (20): * TLSv1.2 (IN), TLS handshake, Finished (20): * SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384 * ALPN, server accepted to use http/1.1 * Server certificate: * subject: C=US; ST=New York; L=Armonk; O=INTERNATIONAL BUSINESS MACHINES CORPORATION; CN=*.watsonplatform.net * start date: Jan 9 00:00:00 2018 GMT * expire date: Mar 9 12:00:00 2020 GMT * subjectAltName: host "stream-fra.watsonplatform.net" matched cert's "*.watsonplatform.net" * issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=GeoTrust RSA CA 2018 * SSL certificate verify ok. * Server auth using Basic with user 'apikey' > POST /speech-to-text/api/v1/recognize HTTP/1.1 > Host: stream-fra.watsonplatform.net > Authorization: Basic YXBpa2V5Onh4eA== > User-Agent: curl/7.58.0 > Accept: */* > Content-Type: audio/flac > Content-Length: 6 > * upload completely sent off: 6 out of 6 bytes < HTTP/1.1 401 Unauthorized HTTP/1.1 401 Unauthorized < Date: Tue, 13 Nov 2018 18:52:41 GMT Date: Tue, 13 Nov 2018 18:52:41 GMT < Content-Type: application/json Content-Type: application/json < Content-Length: 37 Content-Length: 37 < Connection: keep-alive Connection: keep-alive * Authentication problem. Ignoring this. < Www-Authenticate: Basic realm="IBM Watson Gateway(Log-in)" Www-Authenticate: Basic realm="IBM Watson Gateway(Log-in)" < * Connection #0 to host stream-fra.watsonplatform.net left intact {"code":401, "error": "Unauthorized"}