This project is read-only.

Authentication Method

Jun 16, 2011 at 2:53 AM

So i've finally had a bit of time to look at your project. I added my apiKey, secret and subdomain and the response back that i get is UnauthorizedException. using fiddler i can see its calling GET /api/v1/oauth/request_token.json HTTP/1.1 when it gets this error

I've never really dealt with this sort of api and oauth so i'm still learning it. I've been reading this document and it talks about the 2 authentication methods. are you able to explain a bit more about how the project authenticates? i don't think its using SSO but the other method talks about redirecting the user to grant your application access. it doesn't look like its doing that though.

Jun 16, 2011 at 4:20 PM

Unfortunately the developer docs at uservoice are a little .... incorrect at times :(

We are not using the SSO method but rather the two step OAuth method (it was the first I had dealt with it as well).  Just as confirmation, did you go through the steps outlined here: ?  

Unfortunately the Unauthorized exception is a sort of catch all exception that the UV server likes to send for anything reason even remotely close to authentication, and you can't, asaik, get it to give you a helpful message.  If you have gone through the steps in that link and it's not working let me know and I'll hop on Skype or the like and help you out.

Jun 17, 2011 at 12:38 AM

Yep i've followed the instructions set up there and this values of the properties

            var apiKey = "RdzKkgMbEQvJb5w8Te3F6w";
            var apiSecret = "wE83Jhj8VjOdxgLpM1J88Z8Bn4Xs32u0inbraWJ8k";
            var subdomain = "praethintest";

This is the app settings from uservoice

  • Key: RdzKkgMbEQvJb5w8Te3F6w
  • Secret: wE83Jhj8VjOdxgLpM1J88Z8Bn4Xs32u0inbraWJ8k
  • Trusted: No
  • URL:
  • Callback URL: 
  • Request Token URL:
  • Access Token URL:
  • Authorize URL:

Its a test forum so i don't mind you giving it a go.

Jun 17, 2011 at 4:25 AM

So the problem is that you were attempting to register using the same credentials as the user who set up the site I'm guessing.  If you run the test program and make up a new email address you should be good to go.  Note that this is a limitation within the UserVoice API that I still don't quite understand (but I am looking into it as it's quite annoying :) )

Jun 17, 2011 at 6:20 AM

I just realised that its probably working but what i was trying to do is add the ability to register a new account. Not sure why i didn't realise that earlier i guess still not knowing the api and whether i'm doing the write thing threw me off. I guess what i was trying to do is find how to identify if a user exists and then it looks like i should call a POST to /api/v1/users to create a user but it says it requires OAuth. wouldn't that mean you need to be logged in? or is this separate to the login process.