daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest May 16th, 2018 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Sub SurroundingSub()
  2. Dim accessToken As String = "xxxxxxxxxxxxxxxxxxx"
  3. Dim apiVersion As String = "v1"
  4. Dim tvApiBaseUrl As String = "https://webapi.teamviewer.com"
  5. Dim address As String = tvApiBaseUrl & "/api/" & apiVersion & "/devices"
  6.  
  7. Try
  8.     Dim request As HttpWebRequest = TryCast(WebRequest.Create(address), HttpWebRequest)
  9.     request.Headers.Add("Bearer", accessToken)
  10.     request.Method = "GET"
  11.     Dim webResp As WebResponse = request.GetResponse()
  12. Catch __unusedException1__ As Exception
  13. msgbox(__unusedException1__.ToString)
  14. End Try
  15. End Sub
RAW Paste Data
Top