I'm working on a Slack API using vb.net to schedule. In the page of the site there is how to mount the request url of the API methods, but in one of the parameters is highlighted: "Requires scope: channels: read". This is my current code:
Dim oRequest As System.Net.HttpWebRequest
oRequest = System.Net.WebRequest.CreateHttp("https://slack.com/api/channels.list?token=" & oAccessToken.access_token & "&exclude_archived=1")
oRequest.Method = "POST"
oRequest.UserAgent = "Aplicação"
Dim httpResponse As HttpWebResponse = oRequest.GetResponse()
Using streamReader = New StreamReader(httpResponse.GetResponseStream())
Dim result = streamReader.ReadToEnd()
Console.WriteLine(result)
End Using
This returns the following JSON:
{
"ok": false,
"error": "missing_scope",
"needed": "channels:read",
"provided": "identify,bot"
}
This is one of the pages that contains information about the API: link Using WebRequest how can I fit this "Channels: read" that appears to be missing?