Hi people, I am trying to authenticate to a web server using JSON. I guess I am formating my JSON wrong but can't seem to find the problem. Here is my code:
The web site documentation is here: https://vrmapi.victronenergy.com/v2/docs?
Code:
const server_url = "https://vrmapi.victronenergy.com/v2/auth/login" const headers="Content-Type: application/json; charset=UTF-8" 'const headers="Accept", "application/json" dim data as string = chr(34) & "username" & chr(34) & ":" &chr(34) & "MyEmailAddress@gmail.com" & chr(34) & "," & chr(34) & "password" & chr(34) & ":" & chr(34) & "MyReallyCoolPassword" & chr(34) hs.writelog ("Vic", data) dim s as string = hs.URLAction(server_url, "POST", data, headers) hs.writelog ("Vic",s)
Comment