I am using VB Code, Here is code:
request = DirectCast(WebRequest.Create("https://platform.devtest.ringcentral.com/restapi/oauth/token HTTP/1.1"), HttpWebRequest)
Dim Credidentials As String = "NF3Unhp_R4yBV2QoMNM0yw" & ":" & "3ONXJwFDS2akvz2CaPZX9AaGAzR8uPTUS1h4z80lGtcA"
Credidentials = Convert.ToBase64String(Encoding.Default.GetBytes(Credidentials))
' Add authentication to request
Dim Userdata As String = "grant_type=password&username=12143477228&extension=101&password=POR2008$"
request.ContentType = "application/x-www-form-urlencoded;charset=UTF-8"
request.Method = "POST"
request.Host = "platform.devtest.ringcentral.com"
request.Headers("Authorization") = "Basic " & Credidentials & "&" & Userdata
request.Accept = "application/json"
ServicePointManager.ServerCertificateValidationCallback = AddressOf AcceptAllCertifications
return error : the remote server returned an error: (404) Not Found
I just want to get access token, then I can continue to do next api call.