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:
- 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
- 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.
GraemeOn 21 June 2012 00:25, Nick Malyon email@example.com wrote:
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? _
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.
You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To view this discussion on the web visit
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to
For more options, visit this group at
Senior Software Engineer
SOFTWARE SATISFACTION AWARDS 2012* * - *Vote for
** * (We’d be super stoked!)
40 Torphichen Street, Edinburgh, EH3 8JB
FreeAgent Central Ltd. Registered in sunny Scotland SC316774