Having trouble requesting an OAuth token. Can anyone here help?
First off, I'm not sure what URL to send the POST request to.
Secondly, do I need to declare a method? Any help greatly
appreciated..
-- code ---
import urllib.request, urllib.parse, time, string, random
class OAuthToken():
"""Simple object for requesting an OAuth token"""
def __init__(self, consumer_key, secret_key):
self.tokreq = {'method': 'authorize'} #no idea what to put for
method
self.tokreq['oauth_consumer_key'] = consumer_key
self.tokreq['oauth_signature_method'] = 'HMAC-SHA1'
self.tokreq['oauth_signature'] = secret_key
self.tokreq['oauth_timestamp'] = str(int(time.time()))
self.tokreq['oauth_nonce'] = random.choice
(string.ascii_letters) #Build random nonce
for i in range(0,15):
self.tokreq['oauth_nonce'] += random.choice
(string.ascii_letters)
def get_token(self, url='http://api.jaiku.com/json/api/ request_token'): #is this the right url?
"""Requests an OAuth token from the specified URL"""
fh = urllib.request.urlopen(url, urllib.parse.urlencode
(self.tokreq))
print(fh.read())
The result no matter what I try, I get the dreaded HTTP Error 500 -
it's possible I'm doing something wrong, but error 500 doesn't exactly
give me a lot to work with.
My Jaiku handle is @kimbach
On 20 Mar., 10:08, zealalot <zeala...@gmail.com> wrote:
> Having trouble requesting an OAuth token. Can anyone here help?
> First off, I'm not sure what URL to send the POST request to.
> Secondly, do I need to declare a method? Any help greatly
> appreciated..
> -- code ---
> import urllib.request, urllib.parse, time, string, random
> class OAuthToken():
> """Simple object for requesting an OAuth token"""
> def __init__(self, consumer_key, secret_key):
> self.tokreq = {'method': 'authorize'} #no idea what to put for
> method
> self.tokreq['oauth_consumer_key'] = consumer_key
> self.tokreq['oauth_signature_method'] = 'HMAC-SHA1'
> self.tokreq['oauth_signature'] = secret_key
> self.tokreq['oauth_timestamp'] = str(int(time.time()))
> self.tokreq['oauth_nonce'] = random.choice
> (string.ascii_letters) #Build random nonce
> for i in range(0,15):
> self.tokreq['oauth_nonce'] += random.choice
> (string.ascii_letters)
> def get_token(self, url='http://api.jaiku.com/json/api/ > request_token'): #is this the right url?
> """Requests an OAuth token from the specified URL"""
> fh = urllib.request.urlopen(url, urllib.parse.urlencode
> (self.tokreq))
> print(fh.read())
> The result no matter what I try, I get the dreaded HTTP Error 500 -
> it's possible I'm doing something wrong, but error 500 doesn't exactly
> give me a lot to work with.
> My Jaiku handle is @kimbach
> On 20 Mar., 10:08, zealalot <zeala...@gmail.com> wrote:
> > Having trouble requesting an OAuth token. Can anyone here help?
> > First off, I'm not sure what URL to send the POST request to.
> > Secondly, do I need to declare a method? Any help greatly
> > appreciated..
> > -- code ---
> > import urllib.request, urllib.parse, time, string, random
> > class OAuthToken():
> > """Simple object for requesting an OAuth token"""
> > def __init__(self, consumer_key, secret_key):
> > self.tokreq = {'method': 'authorize'} #no idea what to put for
> > method
> > self.tokreq['oauth_consumer_key'] = consumer_key
> > self.tokreq['oauth_signature_method'] = 'HMAC-SHA1'
> > self.tokreq['oauth_signature'] = secret_key
> > self.tokreq['oauth_timestamp'] = str(int(time.time()))
> > self.tokreq['oauth_nonce'] = random.choice
> > (string.ascii_letters) #Build random nonce
> > for i in range(0,15):
> > self.tokreq['oauth_nonce'] += random.choice
> > (string.ascii_letters)
> > def get_token(self, url='http://api.jaiku.com/json/api/ > > request_token'): #is this the right url?
> > """Requests an OAuth token from the specified URL"""
> > fh = urllib.request.urlopen(url, urllib.parse.urlencode
> > (self.tokreq))
> > print(fh.read())
I'm connecting to www.jaiku.com on port 80 (it will most likely
resolve to the same IP as jaiku.com), after that I try to access /api/
request_token which is an OAuth best-practice AFAIK
On 20 Mar., 15:38, zealalot <zeala...@gmail.com> wrote:
> > The result no matter what I try, I get the dreaded HTTP Error 500 -
> > it's possible I'm doing something wrong, but error 500 doesn't exactly
> > give me a lot to work with.
> > My Jaiku handle is @kimbach
> > On 20 Mar., 10:08, zealalot <zeala...@gmail.com> wrote:
> > > Having trouble requesting an OAuth token. Can anyone here help?
> > > First off, I'm not sure what URL to send the POST request to.
> > > Secondly, do I need to declare a method? Any help greatly
> > > appreciated..
> > > -- code ---
> > > import urllib.request, urllib.parse, time, string, random
> > > class OAuthToken():
> > > """Simple object for requesting an OAuth token"""
> > > def __init__(self, consumer_key, secret_key):
> > > self.tokreq = {'method': 'authorize'} #no idea what to put for
> > > method
> > > self.tokreq['oauth_consumer_key'] = consumer_key
> > > self.tokreq['oauth_signature_method'] = 'HMAC-SHA1'
> > > self.tokreq['oauth_signature'] = secret_key
> > > self.tokreq['oauth_timestamp'] = str(int(time.time()))
> > > self.tokreq['oauth_nonce'] = random.choice
> > > (string.ascii_letters) #Build random nonce
> > > for i in range(0,15):
> > > self.tokreq['oauth_nonce'] += random.choice
> > > (string.ascii_letters)
> > > def get_token(self, url='http://api.jaiku.com/json/api/ > > > request_token'): #is this the right url?
> > > """Requests an OAuth token from the specified URL"""
> > > fh = urllib.request.urlopen(url, urllib.parse.urlencode
> > > (self.tokreq))
> > > print(fh.read())
Well, I finally managed to get a request_token! Now if I could only
figure out how to authorize it, and get an access_token. To finally
get the request token, I used 'GET' instead of 'POST' and
'www.jaiku.com' instead of 'jaiku.com'. Here's my code:
-- CODE --
#!/usr/bin/python
import oauth, httplib, urllib
#Define Constants
KEY = 'Your key from the JAIKU API page' #Change Me
SECRET = 'Your secret key' #Change Me
SERVER = 'www.jaiku.com' REQURL = '/api/request_token'
> I'm connecting towww.jaiku.comon port 80 (it will most likely
> resolve to the same IP as jaiku.com), after that I try to access /api/
> request_token which is an OAuth best-practice AFAIK
> On 20 Mar., 15:38, zealalot <zeala...@gmail.com> wrote:
> > > The result no matter what I try, I get the dreaded HTTP Error 500 -
> > > it's possible I'm doing something wrong, but error 500 doesn't exactly
> > > give me a lot to work with.
> > > My Jaiku handle is @kimbach
> > > On 20 Mar., 10:08, zealalot <zeala...@gmail.com> wrote:
> > > > Having trouble requesting an OAuth token. Can anyone here help?
> > > > First off, I'm not sure what URL to send the POST request to.
> > > > Secondly, do I need to declare a method? Any help greatly
> > > > appreciated..
> > > > -- code ---
> > > > import urllib.request, urllib.parse, time, string, random
> > > > class OAuthToken():
> > > > """Simple object for requesting an OAuth token"""
> > > > def __init__(self, consumer_key, secret_key):
> > > > self.tokreq = {'method': 'authorize'} #no idea what to put for
> > > > method
> > > > self.tokreq['oauth_consumer_key'] = consumer_key
> > > > self.tokreq['oauth_signature_method'] = 'HMAC-SHA1'
> > > > self.tokreq['oauth_signature'] = secret_key
> > > > self.tokreq['oauth_timestamp'] = str(int(time.time()))
> > > > self.tokreq['oauth_nonce'] = random.choice
> > > > (string.ascii_letters) #Build random nonce
> > > > for i in range(0,15):
> > > > self.tokreq['oauth_nonce'] += random.choice
> > > > (string.ascii_letters)
> > > > def get_token(self, url='http://api.jaiku.com/json/api/ > > > > request_token'): #is this the right url?
> > > > """Requests an OAuth token from the specified URL"""
> > > > fh = urllib.request.urlopen(url, urllib.parse.urlencode
> > > > (self.tokreq))
> > > > print(fh.read())
Thanks that helped me too, now I also get request tokens, and I was
also able to generate the authorize URL (in this format:
http://www.jaiku.com/api/authorize?oauth_token=REQUEST_TOKEN_KEY&perm...),
and Jaiku apparently accepted the autorization request, unfortunately
the autorized tokens didn't show up on the list of authorized tokens
(http://www.jaiku.com/api/tokens), and I suspect that that is the
reason the subsequent requests for access tokens fails. I'm trying to
look at the #JaikuEngine source for clues.
It also seems wrong to me that we're served some HTML and HTTP 200 in
case of an error, but I don't know the OAuth best pratice on error
handling.
On 23 Mar., 17:42, zealalot <zeala...@gmail.com> wrote:
> Well, I finally managed to get a request_token! Now if I could only
> figure out how to authorize it, and get an access_token. To finally
> get the request token, I used 'GET' instead of 'POST' and
> 'www.jaiku.com'instead of 'jaiku.com'. Here's my code:
> -- CODE --
> #!/usr/bin/python
> import oauth, httplib, urllib
> #Define Constants
> KEY = 'Your key from the JAIKU API page' #Change Me
> SECRET = 'Your secret key' #Change Me
> SERVER = 'www.jaiku.com' > REQURL = '/api/request_token'
> On Mar 20, 10:51 am, Kim Bach <kim.b...@gmail.com> wrote:
> > I'm connecting towww.jaiku.comonport 80 (it will most likely
> > resolve to the same IP as jaiku.com), after that I try to access /api/
> > request_token which is an OAuth best-practice AFAIK
> > On 20 Mar., 15:38, zealalot <zeala...@gmail.com> wrote:
> > > > The result no matter what I try, I get the dreaded HTTP Error 500 -
> > > > it's possible I'm doing something wrong, but error 500 doesn't exactly
> > > > give me a lot to work with.
> > > > > Having trouble requesting an OAuth token. Can anyone here help?
> > > > > First off, I'm not sure what URL to send the POST request to.
> > > > > Secondly, do I need to declare a method? Any help greatly
> > > > > appreciated..
> > > > > -- code ---
> > > > > import urllib.request, urllib.parse, time, string, random
> Thanks that helped me too, now I also get request tokens, and I was
> also able to generate the authorize URL (in this format:http://www.jaiku.com/api/authorize?oauth_token=REQUEST_TOKEN_KEY&perm...),
> and Jaiku apparently accepted the autorization request, unfortunately
> the autorized tokens didn't show up on the list of authorized tokens
> (http://www.jaiku.com/api/tokens), and I suspect that that is the
> reason the subsequent requests for access tokens fails. I'm trying to
> look at the #JaikuEngine source for clues.
> It also seems wrong to me that we're served some HTML and HTTP 200 in
> case of an error, but I don't know the OAuth best pratice on error
> handling.
> On 23 Mar., 17:42, zealalot <zeala...@gmail.com> wrote:
> > Well, I finally managed to get a request_token! Now if I could only
> > figure out how to authorize it, and get an access_token. To finally
> > get the request token, I used 'GET' instead of 'POST' and
> > 'www.jaiku.com'insteadof 'jaiku.com'. Here's my code:
> > -- CODE --
> > #!/usr/bin/python
> > import oauth, httplib, urllib
> > #Define Constants
> > KEY = 'Your key from the JAIKU API page' #Change Me
> > SECRET = 'Your secret key' #Change Me
> > SERVER = 'www.jaiku.com' > > REQURL = '/api/request_token'
> > On Mar 20, 10:51 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > I'm connecting towww.jaiku.comonport80 (it will most likely
> > > resolve to the same IP as jaiku.com), after that I try to access /api/
> > > request_token which is an OAuth best-practice AFAIK
> > > On 20 Mar., 15:38, zealalot <zeala...@gmail.com> wrote:
> > > > Thanks for the reply Kim.
> > > > I was wondering, what URL do you send your POST request to? I've
> > > > triedhttp://jaiku.com/api/request_tokenandhttp://api.jaiku.com/json.
> > > > I get the 'something broke' page on the first, and 'invalid method' on
> > > > the second.
> > > > Thanks,
> > > > zealalot@jaiku
> > > > On Mar 20, 6:08 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > > The result no matter what I try, I get the dreaded HTTP Error 500 -
> > > > > it's possible I'm doing something wrong, but error 500 doesn't exactly
> > > > > give me a lot to work with.
> > > > > > Having trouble requesting an OAuth token. Can anyone here help?
> > > > > > First off, I'm not sure what URL to send the POST request to.
> > > > > > Secondly, do I need to declare a method? Any help greatly
> > > > > > appreciated..
> > > > > > -- code ---
> > > > > > import urllib.request, urllib.parse, time, string, random
> After that, the token actually showed up in my activated tokens list.
> On Mar 24, 4:44 am, Kim Bach <kim.b...@gmail.com> wrote:
> > Thanks that helped me too, now I also get request tokens, and I was
> > also able to generate the authorize URL (in this format:http://www.jaiku.com/api/authorize?oauth_token=REQUEST_TOKEN_KEY&perm...),
> > and Jaiku apparently accepted the autorization request, unfortunately
> > the autorized tokens didn't show up on the list of authorized tokens
> > (http://www.jaiku.com/api/tokens), and I suspect that that is the
> > reason the subsequent requests for access tokens fails. I'm trying to
> > look at the #JaikuEngine source for clues.
> > It also seems wrong to me that we're served some HTML and HTTP 200 in
> > case of an error, but I don't know the OAuth best pratice on error
> > handling.
> > On 23 Mar., 17:42, zealalot <zeala...@gmail.com> wrote:
> > > Well, I finally managed to get a request_token! Now if I could only
> > > figure out how to authorize it, and get an access_token. To finally
> > > get the request token, I used 'GET' instead of 'POST' and
> > > 'www.jaiku.com'insteadof'jaiku.com'. Here's my code:
> > > -- CODE --
> > > #!/usr/bin/python
> > > import oauth, httplib, urllib
> > > #Define Constants
> > > KEY = 'Your key from the JAIKU API page' #Change Me
> > > SECRET = 'Your secret key' #Change Me
> > > SERVER = 'www.jaiku.com' > > > REQURL = '/api/request_token'
> > > On Mar 20, 10:51 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > I'm connecting towww.jaiku.comonport80(it will most likely
> > > > resolve to the same IP as jaiku.com), after that I try to access /api/
> > > > request_token which is an OAuth best-practice AFAIK
> > > > > I was wondering, what URL do you send your POST request to? I've
> > > > > triedhttp://jaiku.com/api/request_tokenandhttp://api.jaiku.com/json.
> > > > > I get the 'something broke' page on the first, and 'invalid method' on
> > > > > the second.
> > > > > Thanks,
> > > > > zealalot@jaiku
> > > > > On Mar 20, 6:08 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > > > The result no matter what I try, I get the dreaded HTTP Error 500 -
> > > > > > it's possible I'm doing something wrong, but error 500 doesn't exactly
> > > > > > give me a lot to work with.
> > > > > > > Having trouble requesting an OAuth token. Can anyone here help?
> > > > > > > First off, I'm not sure what URL to send the POST request to.
> > > > > > > Secondly, do I need to declare a method? Any help greatly
> > > > > > > appreciated..
> > > > > > > -- code ---
> > > > > > > import urllib.request, urllib.parse, time, string, random
I have the same problem, I can't get the
access token.
After a user authorizes a request token (he clicks
the button 'authorize' in /api/authorize page) he's not redirected
back to my website but he remains in the same page and I can't go on
to ask for an access token.
And also the autorized tokens don't show up on the list of authorized
tokens (http://www.jaiku.com/api/tokens)
I have added to the authorize url the oauth_callback parameter with a
url on my website to let me know that the user has completed
authorizing me and to get the authorized token but it doesn't work
Thanks for any help...
On 25 Mar, 14:27, Kim Bach <kim.b...@gmail.com> wrote:
> > After that, the token actually showed up in my activated tokens list.
> > On Mar 24, 4:44 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > Thanks that helped me too, now I also get request tokens, and I was
> > > also able to generate the authorize URL (in this format:http://www.jaiku.com/api/authorize?oauth_token=REQUEST_TOKEN_KEY&perm...),
> > > and Jaiku apparently accepted the autorization request, unfortunately
> > > the autorized tokens didn't show up on the list of authorized tokens
> > > (http://www.jaiku.com/api/tokens), and I suspect that that is the
> > > reason the subsequent requests for access tokens fails. I'm trying to
> > > look at the #JaikuEngine source for clues.
> > > It also seems wrong to me that we're served some HTML and HTTP 200 in
> > > case of an error, but I don't know the OAuth best pratice on error
> > > handling.
> > > On 23 Mar., 17:42, zealalot <zeala...@gmail.com> wrote:
> > > > Well, I finally managed to get a request_token! Now if I could only
> > > > figure out how to authorize it, and get an access_token. To finally
> > > > get the request token, I used 'GET' instead of 'POST' and
> > > > 'www.jaiku.com'insteadof'jaiku.com'. Here's my code:
> > > > -- CODE --
> > > > #!/usr/bin/python
> > > > import oauth, httplib, urllib
> > > > #Define Constants
> > > > KEY = 'Your key from the JAIKU API page' #Change Me
> > > > SECRET = 'Your secret key' #Change Me
> > > > SERVER = 'www.jaiku.com' > > > > REQURL = '/api/request_token'
> > > > On Mar 20, 10:51 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > > I'm connecting towww.jaiku.comonport80(itwill most likely
> > > > > resolve to the same IP as jaiku.com), after that I try to access /api/
> > > > > request_token which is an OAuth best-practice AFAIK
> > > > > > I was wondering, what URL do you send your POST request to? I've
> > > > > > triedhttp://jaiku.com/api/request_tokenandhttp://api.jaiku.com/json.
> > > > > > I get the 'something broke' page on the first, and 'invalid method' on
> > > > > > the second.
> > > > > > Thanks,
> > > > > > zealalot@jaiku
> > > > > > On Mar 20, 6:08 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > > > > The result no matter what I try, I get the dreaded HTTP Error 500 -
> > > > > > > it's possible I'm doing something wrong, but error 500 doesn't exactly
> > > > > > > give me a lot to work with.
> > > > > > > > Having trouble requesting an OAuth token. Can anyone here help?
> > > > > > > > First off, I'm not sure what URL to send the POST request to.
> > > > > > > > Secondly, do I need to declare a method? Any help greatly
> > > > > > > > appreciated..
> > > > > > > > -- code ---
> > > > > > > > import urllib.request, urllib.parse, time, string, random
> I have the same problem, I can't get the
> access token.
> After a user authorizes a request token (he clicks
> the button 'authorize' in /api/authorize page) he's not redirected
> back to my website but he remains in the same page and I can't go on
> to ask for an access token.
> And also the autorized tokens don't show up on the list of authorized
> tokens (http://www.jaiku.com/api/tokens)
> I have added to the authorize url the oauth_callback parameter with a
> url on my website to let me know that the user has completed
> authorizing me and to get the authorized token but it doesn't work
> Thanks for any help...
> On 25 Mar, 14:27, Kim Bach <kim.b...@gmail.com> wrote:
> > So far I've had no success getting anything show up in the list of
> > authorised API tokens (http://www.jaiku.com/api/tokens)
> > What is the name of your app, I might try using the same appname
> > On 25 Mar., 02:41, zealalot <zeala...@gmail.com> wrote:
> > > For me to get an authorized request, I actually ended up building
> > > something like:
> > > After that, the token actually showed up in my activated tokens list.
> > > On Mar 24, 4:44 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > Thanks that helped me too, now I also get request tokens, and I was
> > > > also able to generate the authorize URL (in this format:http://www.jaiku.com/api/authorize?oauth_token=REQUEST_TOKEN_KEY&perm...),
> > > > and Jaiku apparently accepted the autorization request, unfortunately
> > > > the autorized tokens didn't show up on the list of authorized tokens
> > > > (http://www.jaiku.com/api/tokens), and I suspect that that is the
> > > > reason the subsequent requests for access tokens fails. I'm trying to
> > > > look at the #JaikuEngine source for clues.
> > > > It also seems wrong to me that we're served some HTML and HTTP 200 in
> > > > case of an error, but I don't know the OAuth best pratice on error
> > > > handling.
> > > > > Well, I finally managed to get a request_token! Now if I could only
> > > > > figure out how to authorize it, and get an access_token. To finally
> > > > > get the request token, I used 'GET' instead of 'POST' and
> > > > > 'www.jaiku.com'insteadof'jaiku.com'. Here's my code:
> > > > > -- CODE --
> > > > > #!/usr/bin/python
> > > > > import oauth, httplib, urllib
> > > > > #Define Constants
> > > > > KEY = 'Your key from the JAIKU API page' #Change Me
> > > > > SECRET = 'Your secret key' #Change Me
> > > > > SERVER = 'www.jaiku.com' > > > > > REQURL = '/api/request_token'
> > > > > On Mar 20, 10:51 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > > > I'm connecting towww.jaiku.comonport80(itwillmost likely
> > > > > > resolve to the same IP as jaiku.com), after that I try to access /api/
> > > > > > request_token which is an OAuth best-practice AFAIK
> > > > > > > I was wondering, what URL do you send your POST request to? I've
> > > > > > > triedhttp://jaiku.com/api/request_tokenandhttp://api.jaiku.com/json.
> > > > > > > I get the 'something broke' page on the first, and 'invalid method' on
> > > > > > > the second.
> > > > > > > Thanks,
> > > > > > > zealalot@jaiku
> > > > > > > On Mar 20, 6:08 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > > > > > The result no matter what I try, I get the dreaded HTTP Error 500 -
> > > > > > > > it's possible I'm doing something wrong, but error 500 doesn't exactly
> > > > > > > > give me a lot to work with.
> > > > > > > > > Having trouble requesting an OAuth token. Can anyone here help?
> > > > > > > > > First off, I'm not sure what URL to send the POST request to.
> > > > > > > > > Secondly, do I need to declare a method? Any help greatly
> > > > > > > > > appreciated..
> > > > > > > > > -- code ---
> > > > > > > > > import urllib.request, urllib.parse, time, string, random
> On 27 Mar., 10:51, jade <giada.fatare...@gmail.com> wrote:
> > Hi all,
> > I have the same problem, I can't get the
> > access token.
> > After a user authorizes a request token (he clicks
> > the button 'authorize' in /api/authorize page) he's not redirected
> > back to my website but he remains in the same page and I can't go on
> > to ask for an access token.
> > And also the autorized tokens don't show up on the list of authorized
> > tokens (http://www.jaiku.com/api/tokens)
> > I have added to the authorize url the oauth_callback parameter with a
> > url on my website to let me know that the user has completed
> > authorizing me and to get the authorized token but it doesn't work
> > Thanks for any help...
> > On 25 Mar, 14:27, Kim Bach <kim.b...@gmail.com> wrote:
> > > So far I've had no success getting anything show up in the list of
> > > authorised API tokens (http://www.jaiku.com/api/tokens)
> > > What is the name of your app, I might try using the same appname
> > > On 25 Mar., 02:41, zealalot <zeala...@gmail.com> wrote:
> > > > For me to get an authorized request, I actually ended up building
> > > > something like:
> > > > After that, the token actually showed up in my activated tokens list.
> > > > On Mar 24, 4:44 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > > Thanks that helped me too, now I also get request tokens, and I was
> > > > > also able to generate the authorize URL (in this format:http://www.jaiku.com/api/authorize?oauth_token=REQUEST_TOKEN_KEY&perm...),
> > > > > and Jaiku apparently accepted the autorization request, unfortunately
> > > > > the autorized tokens didn't show up on the list of authorized tokens
> > > > > (http://www.jaiku.com/api/tokens), and I suspect that that is the
> > > > > reason the subsequent requests for access tokens fails. I'm trying to
> > > > > look at the #JaikuEngine source for clues.
> > > > > It also seems wrong to me that we're served some HTML and HTTP 200 in
> > > > > case of an error, but I don't know the OAuth best pratice on error
> > > > > handling.
> > > > > > Well, I finally managed to get a request_token! Now if I could only
> > > > > > figure out how to authorize it, and get an access_token. To finally
> > > > > > get the request token, I used 'GET' instead of 'POST' and
> > > > > > 'www.jaiku.com'insteadof'jaiku.com'. Here's my code:
> > > > > > On Mar 20, 10:51 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > > > > I'm connecting towww.jaiku.comonport80(itwillmostlikely > > > > > > > resolve to the same IP as jaiku.com), after that I try to access /api/
> > > > > > > request_token which is an OAuth best-practice AFAIK
> > > > > > > > I was wondering, what URL do you send your POST request to? I've
> > > > > > > > triedhttp://jaiku.com/api/request_tokenandhttp://api.jaiku.com/json.
> > > > > > > > I get the 'something broke' page on the first, and 'invalid method' on
> > > > > > > > the second.
> > > > > > > > Thanks,
> > > > > > > > zealalot@jaiku
> > > > > > > > On Mar 20, 6:08 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > > > > > > The result no matter what I try, I get the dreaded HTTP Error 500 -
> > > > > > > > > it's possible I'm doing something wrong, but error 500 doesn't exactly
> > > > > > > > > give me a lot to work with.
> > > > > > > > > > Having trouble requesting an OAuth token. Can anyone here help?
> > > > > > > > > > First off, I'm not sure what URL to send the POST request to.
> > > > > > > > > > Secondly, do I need to declare a method? Any help greatly
> > > > > > > > > > appreciated..
> > > > > > > > > > -- code ---
> > > > > > > > > > import urllib.request, urllib.parse, time, string, random
> > On 27 Mar., 10:51, jade <giada.fatare...@gmail.com> wrote:
> > > Hi all,
> > > I have the same problem, I can't get the
> > > access token.
> > > After a user authorizes a request token (he clicks
> > > the button 'authorize' in /api/authorize page) he's not redirected
> > > back to my website but he remains in the same page and I can't go on
> > > to ask for an access token.
> > > And also the autorized tokens don't show up on the list of authorized
> > > tokens (http://www.jaiku.com/api/tokens)
> > > I have added to the authorize url the oauth_callback parameter with a
> > > url on my website to let me know that the user has completed
> > > authorizing me and to get the authorized token but it doesn't work
> > > Thanks for any help...
> > > On 25 Mar, 14:27, Kim Bach <kim.b...@gmail.com> wrote:
> > > > So far I've had no success getting anything show up in the list of
> > > > authorised API tokens (http://www.jaiku.com/api/tokens)
> > > > What is the name of your app, I might try using the same appname
> > > > > After that, the token actually showed up in my activated tokens list.
> > > > > On Mar 24, 4:44 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > > > Thanks that helped me too, now I also get request tokens, and I was
> > > > > > also able to generate the authorize URL (in this format:http://www.jaiku.com/api/authorize?oauth_token=REQUEST_TOKEN_KEY&perm...),
> > > > > > and Jaiku apparently accepted the autorization request, unfortunately
> > > > > > the autorized tokens didn't show up on the list of authorized tokens
> > > > > > (http://www.jaiku.com/api/tokens), and I suspect that that is the
> > > > > > reason the subsequent requests for access tokens fails. I'm trying to
> > > > > > look at the #JaikuEngine source for clues.
> > > > > > It also seems wrong to me that we're served some HTML and HTTP 200 in
> > > > > > case of an error, but I don't know the OAuth best pratice on error
> > > > > > handling.
> > > > > > > Well, I finally managed to get a request_token! Now if I could only
> > > > > > > figure out how to authorize it, and get an access_token. To finally
> > > > > > > get the request token, I used 'GET' instead of 'POST' and
> > > > > > > 'www.jaiku.com'insteadof'jaiku.com'. Here's my code:
> > > > > > > On Mar 20, 10:51 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > > > > > I'm connecting towww.jaiku.comonport80(itwillmostlikely > > > > > > > > resolve to the same IP as jaiku.com), after that I try to access /api/
> > > > > > > > request_token which is an OAuth best-practice AFAIK
> > > > > > > > > I was wondering, what URL do you send your POST request to? I've
> > > > > > > > > triedhttp://jaiku.com/api/request_tokenandhttp://api.jaiku.com/json.
> > > > > > > > > I get the 'something broke' page on the first, and 'invalid method' on
> > > > > > > > > the second.
> > > > > > > > > Thanks,
> > > > > > > > > zealalot@jaiku
> > > > > > > > > On Mar 20, 6:08 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > > > > > > > The result no matter what I try, I get the dreaded HTTP Error 500 -
> > > > > > > > > > it's possible I'm doing something wrong, but error 500 doesn't exactly
> > > > > > > > > > give me a lot to work with.
> > > > > > > > > > > Having trouble requesting an OAuth token. Can anyone here help?
> > > > > > > > > > > First off, I'm not sure what URL to send the POST request to.
> > > > > > > > > > > Secondly, do I need to declare a method? Any help greatly
> > > > > > > > > > > appreciated..
> > > > > > > > > > > -- code ---
> > > > > > > > > > > import urllib.request, urllib.parse, time, string, random
Zealots code was a good start. Unfortunately oauth_callback in web
mode is broken. I submitted a patch and it looks like it's been
picked up. Hopefully it will be fixed soon.
> > > On 27 Mar., 10:51, jade <giada.fatare...@gmail.com> wrote:
> > > > Hi all,
> > > > I have the same problem, I can't get the
> > > > access token.
> > > > After a user authorizes a request token (he clicks
> > > > the button 'authorize' in /api/authorize page) he's not redirected
> > > > back to my website but he remains in the same page and I can't go on
> > > > to ask for an access token.
> > > > And also the autorized tokens don't show up on the list of authorized
> > > > tokens (http://www.jaiku.com/api/tokens)
> > > > I have added to the authorize url the oauth_callback parameter with a
> > > > url on my website to let me know that the user has completed
> > > > authorizing me and to get the authorized token but it doesn't work
> > > > Thanks for any help...
> > > > On 25 Mar, 14:27, Kim Bach <kim.b...@gmail.com> wrote:
> > > > > So far I've had no success getting anything show up in the list of
> > > > > authorised API tokens (http://www.jaiku.com/api/tokens)
> > > > > What is the name of your app, I might try using the same appname
> > > > > > After that, the token actually showed up in my activated tokens list.
> > > > > > On Mar 24, 4:44 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > > > > Thanks that helped me too, now I also get request tokens, and I was
> > > > > > > also able to generate the authorize URL (in this format:http://www.jaiku.com/api/authorize?oauth_token=REQUEST_TOKEN_KEY&perm...),
> > > > > > > and Jaiku apparently accepted the autorization request, unfortunately
> > > > > > > the autorized tokens didn't show up on the list of authorized tokens
> > > > > > > (http://www.jaiku.com/api/tokens), and I suspect that that is the
> > > > > > > reason the subsequent requests for access tokens fails. I'm trying to
> > > > > > > look at the #JaikuEngine source for clues.
> > > > > > > It also seems wrong to me that we're served some HTML and HTTP 200 in
> > > > > > > case of an error, but I don't know the OAuth best pratice on error
> > > > > > > handling.
> > > > > > > > Well, I finally managed to get a request_token! Now if I could only
> > > > > > > > figure out how to authorize it, and get an access_token. To finally
> > > > > > > > get the request token, I used 'GET' instead of 'POST' and
> > > > > > > > 'www.jaiku.com'insteadof'jaiku.com'. Here's my code:
> > > > > > > > On Mar 20, 10:51 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > > > > > > I'm connecting towww.jaiku.comonport80(itwillmostlikely > > > > > > > > > resolve to the same IP as jaiku.com), after that I try to access /api/
> > > > > > > > > request_token which is an OAuth best-practice AFAIK
> > > > > > > > > > I was wondering, what URL do you send your POST request to? I've
> > > > > > > > > > triedhttp://jaiku.com/api/request_tokenandhttp://api.jaiku.com/json.
> > > > > > > > > > I get the 'something broke' page on the first, and 'invalid method' on
> > > > > > > > > > the second.
> > > > > > > > > > Thanks,
> > > > > > > > > > zealalot@jaiku
> > > > > > > > > > On Mar 20, 6:08 am, Kim Bach <kim.b...@gmail.com> wrote:
> > > > > > > > > > > The result no matter what I try, I get the dreaded HTTP Error 500 -
> > > > > > > > > > > it's possible I'm doing something wrong, but error 500 doesn't exactly
> > > > > > > > > > > give me a lot to work with.
> > > > > > > > > > > > Having trouble requesting an OAuth token. Can anyone here help?
> > > > > > > > > > > > First off, I'm not sure what URL to send the POST request to.
> > > > > > > > > > > > Secondly, do I need to declare a method? Any help greatly
> > > > > > > > > > > > appreciated..
> > > > > > > > > > > > -- code ---
> > > > > > > > > > > > import urllib.request, urllib.parse, time, string, random