client.DownloadString(endPoints) Error vb.NET
CrossOvver.6372:
So, Ive been up on this thing for about 4 straight hours over 1 error, backtracked and everything, and still could not figure out the error im getting:
Public Class Character
Public Function GetCharacter(access_token As String) As String
Dim client As WebClient
Dim endPoints As Uri
Dim ret As String
endPoints = New Uri(APICore.Endpoints.BaseUrl + APICore.Endpoints.CharacterEndPoints + “?access_token=” + access_token)
client = New WebClient()
ret = client.DownloadString(endPoints)
client.Dispose()
Return ret
End Function
End Class
The error is ret = client.DownloadString(endPoints)
which the log says "An unhandled exception of type ‘System.Net.WebException’ occurred in System.dll
Additional information: The remote server returned an error: (403) Forbidden."
:( Any help would be appreciated.
CrossOvver.6372:
Actually, I just found the problem :P the problem is, when someone puts their API in the textbox1.text. I didnt set it correctly. Thanks anyways, even though it took all of 10 minutes for someone to even respond.