3
I’m working on a Slack API using Vb.net to program. On the page of the site there is how to assemble 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
In this way returns the following JSON:
{
"ok": false,
"error": "missing_scope",
"needed": "channels:read",
"provided": "identify,bot"
}
This is one of the pages containing information about the API: https://api.slack.com/methods/channels.list Using Webrequest how can I fit this "Channels:read" that appears to be missing?