2
I’m trying to run this Curl in PHP and do not know how to convert it. Follow the model:
Curl -u "apikey:{apikey}" -X POST "https://gateway-wdc.watsonplatform.net/assistant/api/v2/assistants/{idassistente}/Sessions? version=2019-02-07"
My main question is at this point here: -u "apikey:{apikey}" I don’t know how to do it in Curl with PHP.
The terminal works. I want to pass this logic to PHP curl_exec.
Thanks!
What is your doubt?
-u
or--user
specifies user and password for server authentication.– NoobSaibot
The php documentation is very detailed. http://php.net/manual/en/function.curl-setopt.php Take a look at this documentation, but as our friend said, you can use curl_exec..
– joao vitor
I was looking at this content last week, I hit my head too! kkkk
– Vinicius De Jesus
Yes... I want to pass this logic to curl_exec() .... via terminal works... but I don’t know how to pass to curl_exec
– Guilherme Ferreira