Hello,
You might have a few “user” accounts:
- The user with which you access login.sandbox.freeagent.com
- The user with which you access dev.freeagent.com
- You may also have a user for the main production FreeAgent app (
login.freeagent.com)
To link an app with a sandbox account use the sandbox user credentials (1),
to link an app to your production account use the FreeAgent app credentials
(3). You only use the developer credentials (2) when changing details
about your app at dev.freeagent.com.
Kind regards,
GraemeOn 14 June 2012 14:36, FreeAgentDev s.j.morley.64@googlemail.com wrote:
Been using the Google OAuth Sandbox.
I (of course) have a FreeAgent dev account, which I can log into.
When in the sandbox, and get redirected to the FreeAgent log in, I use my
dev account credentials, but it does not let me in.
Should I be using the dev credentials or my “real user” credentials?On Saturday, 2 June 2012 11:42:41 UTC+1, swombat wrote:
Hmm, embarrassing. Well, I’ve fixed that now and hit a second
hurdle…I’m making a request (via a ruby library called Faraday) which results
in the following debug output:post https://api.freeagent.com/v2/**token_endpointhttps://api.freeagent.com/v2/token_endpoint
Authorization: “Basic
ZTlkR0FwUVp1SU9XNDNiVTNnSHhEdzpaWGZYUm0tRTdsNmZhV01BWW00UmRR”
Content-Type: “application/x-www-form-**urlencoded”
200
server: “nginx/1.0.6”
date: “Sat, 02 Jun 2012 10:39:19 GMT”
content-type: “application/json;charset=UTF-**8”
transfer-encoding: “chunked”
connection: “close”
status: “200 OK”
cache-control: “no-store”
pragma: “no-cache”
etag: “"72bfb83cd74b7658153201172037b988"”
x-ua-compatible: “IE=Edge,chrome=1”
x-runtime: “0.243646”
x-rev: “8864a0b”
x-host: “web4”
{“access_token”:null,“token_**type”:“bearer”,“expires_in”:**null}
{“server”=>“nginx/1.0.6”, “date”=>“Sat, 02 Jun 2012 10:39:19 GMT”,
“content-type”=>“application/**json;charset=UTF-8”, “transfer-
encoding”=>“chunked”, “connection”=>“close”, “status”=>“200 OK”,
“cache-control”=>“no-store”, “pragma”=>“no-cache”,
“etag”=>“"72bfb83cd74b7658153201172037b988"”, “x-ua-
compatible”=>“IE=Edge,chrome=**1”, “x-runtime”=>“0.243646”, “x-
rev”=>“8864a0b”, “x-host”=>“web4”}(note: I will regenerate all the tokens once I’ve got this basic
process sorted, obviously)…As you can see, the access_token is being returned as null, with no
refresh token…Again, not entirely sure what I’m doing wrong there…
For reference, the ruby code is:
conn = Faraday.new(:url => URL[:root]) do |builder| builder.request :url_encoded builder.response :logger builder.adapter :net_http end conn.basic_auth(CLIENT_ID, CLIENT_SECRET) response = conn.post URI[:token_endpoint], { :grant_type => "authorization_code", :code => AUTH_TOKEN, :redirect_url => "http://localhost:3000" } puts response.body puts response.headers
Thanks for your help!
Best Regards,
Daniel
On Jun 1, 2:27 pm, Graeme Boyd graeme.b...@freeagent.com wrote:
Hi Daniel,
You’ve mistyped the client id. It should be CHhOe0GUsnnxXImRKvN75g
(note
the g on the end).API v1 will be decommissioned but not for a few months yet.
Cheers,
Graeme
On 1 June 2012 12:30, swombat daniel.ten...@gmail.com wrote:
I’m trying to get a token so I can integrate our client-tracking
backend system to FreeAgent. For this, the OAuth system is absolute
overkill, but I guess v2 is the preferred way of accessing FA these
days (will v1 be decommissioned?).I’ve tried the following URL:
https://api.freeagent.com/v2/**approve_app?redirect_uri=http%**
3A%2F%2Flo.https://api.freeagent.com/v2/approve_app?redirect_uri=http%3A%2F%2Flo.…When I go there and I log in, it just gives me the utterly unhelpful:
Sorry, there’s been a problem.
Please get in touch with the author of the application you’re
trying to
authorise.Might be helpful to show a better error message to the app developer
maybe on dev.freeagent.com if you don’t want it to end up in front
of
the users…In the meantime, any help from someone at FreeAgent who can see what
error I’m getting would be very helpful…–
You received this message because you are subscribed to the Google
Groups
“FreeAgent API” group.
To post to this group, send email to freeagent_api@googlegroups.com**.To unsubscribe from this group, send email to
freeagent_api+unsubscribe@**googlegroups.comfreeagent_api%2Bunsubscribe@googlegroups.com.For more options, visit this group at
http://groups.google.com/**group/freeagent_api?hl=enhttp://groups.google.com/group/freeagent_api?hl=en.–
Graeme Boyd
Senior Software EngineerWeb. freeagent.com http://www.freeagent.com/ Blog.
The FreeAgent Blog - FreeAgent
Twitter. @freeagent <https://twitter.com/#!/**freeagenthttps://twitter.com/#!/freeagent>
Facebook.
FreeAgent | EdinburghSOFTWARE SATISFACTION AWARDS 2012* * - Vote for
us<http://www.clicktools.com/**survey?iv=1c8dgs13zfxs7r&q1=*
FreeAgent%20Cen…http://www.clicktools.com/survey?iv=1c8dgs13zfxs7r&q1=FreeAgent%20Cen...>** * (We’d be super stoked!)
40 Torphichen Street, Edinburgh, EH3 8JB
FreeAgent Central Ltd. Registered in sunny Scotland SC316774–
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/-/WsK3-DUtIX8J.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