Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 3

401 Unauthorized Error when Creating a New Issue

I'm following this tutorial:

Using the GitHub API in your app


But when I get to the last part in step two which is to create an issue to see if the changes in template_server.rb are working correctly, I get an unauthorized error

C:\Users\arman\Documents\Research\EyeTracking\plugin-app\using-the-github-api-in-your-app>smee --url --path /event_handler --port 3000
Forwarding to
{ Error: Unauthorized
    at Request.callback (C:\Users\arman\AppData\Roaming\npm\node_modules\smee-client\node_modules\superagent\lib\node\index.js:706:15)
    at IncomingMessage.parser (C:\Users\arman\AppData\Roaming\npm\node_modules\smee-client\node_modules\superagent\lib\node\index.js:916:18)
    at IncomingMessage.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  status: 401

I thought this was maybe due to incorrect permissions, but I double-checked with what permissions are supposed to be set for the app, and mine looks to be the same. Any ideas of how to fix this problem?

2 Replies
Community Manager
Message 2 of 3

Re: 401 Unauthorized Error when Creating a New Issue

The last bit of step 2 is to simply log a debug message, so I don't see how you would get an Unauthorized response or what it might be a response to. The only thing that I can think of is that perhaps you hadn't started your Sinatra process that is actually listening to port 3000?


Can you give a little more information as to what exactly you did?

Ground Controller Lvl 1
Message 3 of 3

Re: 401 Unauthorized Error when Creating a New Issue

I'm having the same problem. I was developing GitHub application and testing it locally and everything was working. But now I see "Unauthorized" requests with both `smee` and `ngrok` locally. I don't know why this is started to happen and how can I fix this.