Discussion: Authorization help requested

Hi,

I'm starting an app and using the sample code as a guide. It seems straightforward, but I keep getting the following error: 'OAuth2 fatal error: bad_redirect_uri'.

The exact redirection URL in my app entry is: 'www.alviani.org/glitch/optimize1.php'

The link I'm using (client_id redacted) is:
'http://api.glitch.com/oauth2/authorize?response_type=code&client_id=xxx&redirect_uri=http%3A%2F%2Fwww.alviani.org%2Fglitch%2Foptimize1.php&scope=read&state=hello-world'

Everything looks valid, but I'm not getting anywhere. I also tried this using the https protocol with no more success.

Can anybody provide a suggestion as to where I'm screwing up?

Thanks in advance,
Frank
in "your API Keys", in that app, make sure the redirect url has at the start the "http://"
the redirect_uri param needs to be exactly the same as you used it in the the api settings (and... it is case sensitive)
so it would be 'http://www.alviani.org/glitch/optimize1.php'
As my mother used to say, "If it was a snake it would have bitten you".  Thanks - that solved it :) Now, on to more complex stuff!
Just a note... it seems that if you use the "www." in the auth redirect url, then if someone starts using the website with "domain.com" (without the www. part) the oauth token won't work!!
you need to make sure everyone is using your website with www. all the time.