Hi Nick,
You can do exactly the same for FreeAgent. Twitter and FaceBook are
displaying the Authentication token from the OAuth flow for you to copy
down and use on a different system - we’re just currently not providing
such a nice way to see the Authentication token.
Instead you can use the Google OAuth Playground for this:
- Follow the instructions here:
FreeAgent Developer Dashboard - After you have clicked “Authorize APIs” don’t click “Exchange
Authorization Code for Tokens” but instead copy down the Authorization code. - On your server, give your script the Authorization code and have it
perform the next step of the OAuth flow to retrieve the Access and Refresh
tokens. - Every seven days your script should automatically use the Refresh
token to get a new Access token as the Access token expires
What language are you using for this? If you’re using Ruby, the OAuth2 gem
makes authenticating with OAuth services pretty easy.
Kind regards,
GraemeOn 21 June 2012 00:25, Nick Malyon nick.malyon@gmail.com wrote:
Hey,
Just implementing an internal console app for FreeAgent which will
generate invoices based on number of transactions our clients make on our
system per month. It’s really simple, just needs to run as a cron job and
create the invoice.I’m trying my hardest to use the new OAuth2 API - it would be good if it
supported Out of Band authorisation. Some services, like twitter, will if
you set the redirect_url to ‘oob’ display the auth token to the user for
them to enter into the software themselves.In this situation, that’s far preferable to having to implement and open
up the firewall to a webserver running on the requesting machine. Indeed,
it might not even be possible to make the user request from the machine in
the first place.The ideal flow would be:
Go to this URL on your desktop: https://api.freeagent.com/v2/…
What code did it give you? _
Cool.Another way to do this, which Facebook use, is for FreeAgent to host a
redirect endpoint which spits out the code and to tell developers they can
use that if they don’t have their own callback.Though, their absolute latest is to move to an entirely different
pin-driven device mode.Any plans for this? Otherwise I’ll have to write and deploy a totally
separate page, just to use the new API on the console.Cheers,
- Nick
–
You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To view this discussion on the web visit
https://groups.google.com/d/msg/freeagent_api/-/F7TxFWaPs6sJ.
To post to this group, send email to freeagent_api@googlegroups.com.
To unsubscribe from this group, send email to
freeagent_api+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/freeagent_api?hl=en.
Graeme Boyd
Senior Software Engineer
Web. freeagent.com http://www.freeagent.com/ Blog. The FreeAgent Blog - FreeAgent
Twitter. @freeagent https://twitter.com/#!/freeagent Facebook.
FreeAgent | Edinburgh
SOFTWARE SATISFACTION AWARDS 2012* * - *Vote for
ushttp://www.clicktools.com/survey?iv=1c8dgs13zfxs7r&q1=FreeAgent%20Central%20Ltd&q2=FreeAgent&q3=Accounting%20and%20Finance
** * (We’d be super stoked!)
40 Torphichen Street, Edinburgh, EH3 8JB
FreeAgent Central Ltd. Registered in sunny Scotland SC316774