1

I am trying to build an app but I can't get the authentication right.

I have been following the steps here:

https://api.stackexchange.com/docs/authentication

I keep getting the below error no matter what 'scopes' I choose:

"Access to requested channel denied [InvalidScope, Channels Internal: False]"

I have no idea what I am doing wrong here.
Anybody come across this before and was able to solve it?

10
  • Welcome to Stack Apps! Are you using the implicit or explicit flow? In which step do you get the error? What requests are you sending and what responses do you receive?
    – Glorfindel
    Commented Jul 23, 2020 at 16:37
  • Thanks for getting back to me! I am using the explicit flow. When I try to authenticate my app is when I get the error. This is the setup I have in my app (I am using a platform called Cloud Elements to build it) Auth URL - stackoverflow.com/oauth API Key - xxx API Secret - xxx Token URL - stackoverflow.com/oauth/access_token Scope - read_inbox, no_expiry Then in my app on the Stackoverflow side I have my callback URL as: auth.cloudelements.io/oauth
    – sjago
    Commented Jul 23, 2020 at 18:18
  • Thanks, the main trouble is that I don't recognize the term 'channel'; Stack Overflow for Teams was previously called Channels but it's unlikely you accidentally triggered that part of the API. So I assume it's an error message within Cloud Elements itself.
    – Glorfindel
    Commented Jul 23, 2020 at 18:49
  • Hmm, it seems like the message is coming from Stackoverflow. This is the URL where I get the error (I jumbled up my client ID) stackoverflow.com/…*t64YPogRg%28%28
    – sjago
    Commented Jul 23, 2020 at 19:22
  • The scope is wrong there because it contains a comma; you'll also need the client_id of your Stack App in the call (it's a five digit number).
    – Glorfindel
    Commented Jul 23, 2020 at 19:24
  • ah ok, I have taken the scope down to just one option. It said in the docs to comma separate them if you want to use more but I just want to get a successful connection made here so took it down to one. I think there was some terminology mix up between ID and Key. I replaced the key with the client_id too and now it at least produces a different error: redirect_uri is not under the registered domain for this application Thanks for your help with this!
    – sjago
    Commented Jul 23, 2020 at 19:45
  • "redirect_uri - must be under an apps registered domain" Hmm, what denotes my 'registered domain' here?The OAuth domain in the setup? This is where I entered by callback URL - OAuth Domain auth.cloudelements.io/oauth
    – sjago
    Commented Jul 23, 2020 at 20:24
  • For me, the OAuth domain in stackapps.com/apps/oauth is www.project3851.com and the redirect_uri is https://www.project3851.com but any URI under that domain should work.
    – Glorfindel
    Commented Jul 23, 2020 at 20:56
  • (Note the https:// which is in the redirect_uri parameter but not in the OAuth domain in the app configuration.)
    – Glorfindel
    Commented Jul 24, 2020 at 10:21
  • 1
    After fidgeting around with the URLs I finally got it working in terms of getting no errors from the Stack overflow side. It is still failing authorization for some reason but no more errors so it must be on the other side now. Thank you for all your help!
    – sjago
    Commented Jul 24, 2020 at 13:16

0

You must log in to answer this question.

Browse other questions tagged .