I have a VB.NET console application that connects to OBS Studio using websockets and sends requests to it. Very specifically, I want to use SetTextGDIPlusProperties to show/hide text.
I'm using the obs-websocket-dotnet (v5.0.0.3) nuget package to connect and send the request. I can connect successfully but when I send the request, I get this error back:
OBSWebsocketDotNet.ErrorResponseException
HResult=0x80131500
Message=ErrorCode: 204, Comment: Your request type is not valid.
Source=obs-websocket-dotnet
StackTrace:
at OBSWebsocketDotNet.OBSWebsocket.SendRequest(MessageTypes operationCode, String requestType, JObject additionalFields, Boolean waitForReply)
at OBSWebsocketDotNet.OBSWebsocket.SendRequest(String requestType, JObject additionalFields)
The code to send the request is:
Dim request As String = "{""request-type"":""SetTextGDIPlusProperties"",""source"":""test"",""text"":""Hello, OBS!"",""visible"":true}"
Dim response = obs.SendRequest(request)
where the name of the source is "test". The error message suggests that either the request-type of SetTextGDIPlusProperties is invalid (which it isn't according to this link https://gist.github.com/lee-brown/70e6014a903dfea9e2dfe7e35fc8ab88#settextgdiplusproperties) or that the structure of request is incorrect. I can't find any examples of what a proper structure looks like so I'm hoping I can get an answer here.
I'm using the obs-websocket-dotnet (v5.0.0.3) nuget package to connect and send the request. I can connect successfully but when I send the request, I get this error back:
OBSWebsocketDotNet.ErrorResponseException
HResult=0x80131500
Message=ErrorCode: 204, Comment: Your request type is not valid.
Source=obs-websocket-dotnet
StackTrace:
at OBSWebsocketDotNet.OBSWebsocket.SendRequest(MessageTypes operationCode, String requestType, JObject additionalFields, Boolean waitForReply)
at OBSWebsocketDotNet.OBSWebsocket.SendRequest(String requestType, JObject additionalFields)
The code to send the request is:
Dim request As String = "{""request-type"":""SetTextGDIPlusProperties"",""source"":""test"",""text"":""Hello, OBS!"",""visible"":true}"
Dim response = obs.SendRequest(request)
where the name of the source is "test". The error message suggests that either the request-type of SetTextGDIPlusProperties is invalid (which it isn't according to this link https://gist.github.com/lee-brown/70e6014a903dfea9e2dfe7e35fc8ab88#settextgdiplusproperties) or that the structure of request is incorrect. I can't find any examples of what a proper structure looks like so I'm hoping I can get an answer here.