How can I connect to the okta API using restful calls from a c# or vb program ?
Then I’d like to issue simple API retrival commands such as list users in a group.
By restful I also mean that I can’t bind in any OKTA nuget packages into my app or use the oktaclient object, it all has to be done from raw httpget and httppost
I got there in the end. It’s so hard to find examples and so many examples are very complex. It was very simple in the end:
Try
Dim t As String = "my okta api key"
Dim h As New http
h.AddHeader("Authorization", "SSWS " & t)
Dim s As String = h.HTTPGetNet("https://dev-xxx-admin.okta.com/api/v1/users", "application/json")
Console.WriteLine(s)
Console.ReadLine()
Catch ex As Exception
Console.WriteLine("error:" & ex.Message)
End Try
http is a simple local class to do http gets, and could be replaced with webclient or whatever