Setting the API token per request
I'm writing an app in which people can log in using their Lighthouse token to connect to Lighthouse. Thus, I need to be able to set the token used for each request, rather than set it globally.
Did I hear that there's a new Ruby API library coming? And if so, will it make this possible? Or should I roll my own?
Discussions are closed to public comments.
If you need help with Lighthouse please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Justin Palmer on 23 Jan, 2009 08:58 PM
You can append the token to the url using the _token param.
So you could do:
If you're using the methods defined in the api like 'tickets', you can exclude the outer :params hash.
I believe this should work, let me know if it doesn't.
2 Posted by peeja on 23 Jan, 2009 09:01 PM
It works! Thanks, Justin.