I’m trying to use a basic authentication with CURLSMBS plugin (from 2017),
tried
dim c as new CURLSMBS
dim header() as String
header.Append("Content-Type: application/json; charset=UTF-8")
c.SetOptionHTTPHeader(header)
c.CollectDebugData=true
c.CollectHeaderData=true
c.CollectOutputData=true
c.OptionVerbose = true
c.OptionHTTPAuth = 1
c.OptionUsername = "ncs"
c.OptionPassword = "pwd"
The service has responded to your request indicating you have the parameters wrong. We’d need the documentation from the service to know how to correctly pass the parameters.
I would set HTTPAuth to 14 or 15 to allow basically all ways.
For basic authentication, the plugin internally builds username and password with double colon to make the authenticate header.
If you put password in the user name, that can’t work well.
Please check documentation on how they do it.
Maybe there is already sample code for curl in command line to php available?
The -u you see there was an older option UsrPwd, which had both.
Nowadays we have two options, one for username and one for password and CURL does the : automatically.
The thing is the error message said the parameters are incorrect, not the authentication. In your original post the current_params key in the response was empty. I suspect it’s something else about the request that’s malformed.
Update: You can test what the request looks like when it reaches the server with a service like webhook.site. Compare both a Postman and CURLSMBS request and note the differences.
I’m sorry, I didn’t mean suggest I could help debug this any further. I don’t think I have enough information from the outside to understand anything about what happened here.