Typeform / results-example

Results API example
MIT License
26 stars 18 forks source link

Redirect_uri #7

Open brianbier opened 6 years ago

brianbier commented 6 years ago

{ code: "FORBIDDEN", description: "Forbidden: redirect_uri is not allowed", }

I keep getting this error but I followed the instructions exactly. I am not sure why its happening. my application url .env is http://localhost:5000/

xsaamiir commented 6 years ago

@brianbier I am having the same message, have you been able to solve this issue ?

brianbier commented 6 years ago

@sharkyze No unfortunately.

isabellachen commented 6 years ago

Can Typeform give some additional clues to resolving this issue? :(

isabellachen commented 6 years ago

Oh right, when you create your application, you need to pass http://localhost:5000/callback as the callback uri. The suggestion is to pass http://localhost:5000/authorize, but in the express app the endpoint is callback.

muhsin-k commented 6 years ago

I am facing this issue. I am using ngrok as redirect url.

My url look like this, https://api.typeform.com/oauth/authorize?client_id={CLIENT_ID}&redirect_uri=https://e324asd.ngrok.io/oauth/typeform&scope=accounts:read

screenshot from 2018-09-25 16-54-39 Any idea?

muhsin-k commented 6 years ago

@isabellachen Could you please help me on this?

isabellachen commented 6 years ago

@muhzi4u
Go to admin section: https://admin.typeform.com/account#/section/apps Under applications, Authorization callback URL should be http://localhost:PORT/callback where PORT is the port your server is running on, in my prev comment, mine was on 5000. When you use ngrok, you ngrok that port so ngrok has access to your local server running on that port. When your app goes into production, you change from localhost to whatever your domain name is. At least this worked for me... https://imgur.com/gnKLh0u

muhsin-k commented 6 years ago

What about redirect_uri in my example, https://e324asd.ngrok.io/oauth/typeform or http://localhost:PORT/callback ?

muhsin-k commented 6 years ago

Yes. It is working now. Complete URL is https://api.typeform.com/oauth/authorize?response_type=code&redirect_uri=http://localhost:4040/callback&scope=accounts:read&client_id={CLIENT_ID} @isabellachen Thank you so much

muhsin-k commented 6 years ago

@isabellachen Is there any way to update the Authorization callback URL for an already created app?

isabellachen commented 6 years ago

If there was, I didn't figure it out...

On Tue, 25 Sep 2018 at 17:27, Muhsin.K notifications@github.com wrote:

@isabellachen https://github.com/isabellachen Is there any way to update the Authorization callback URL for an already created app?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Typeform/results-example/issues/7#issuecomment-424387225, or mute the thread https://github.com/notifications/unsubscribe-auth/AI2cmXrcjfWJxETnQIMQMo2suma3qCFwks5uektegaJpZM4Rbxyk .

Samuel-S-Ampofo commented 5 years ago

This is what worked for me

  1. go to you app with this https://admin.typeform.com/account#/section/apps

and for the callback url is http://localhost:{port you are runnin}/callback

  1. In the app.jason use "value": "http://localhost:5000/callback",