How to get refresh token from old acess tokent

Hi,

My old accounts Aceess token’s are expired, I want to refresh it using
refreshtoken API
which you provided but I have one issue that I don’t have refreshtoken of
that my old accounts, how to get that which API should I use?

Okay, so my understanding is that you have the following items:

  • client ID
  • client secret
  • an authorisation code

is this correct?

-J

Hi there,

To request a new access token, you should simply be able to use the
initial authorisation
code https://dev.freeagent.com/docs/oauth#the-authorisation-request, as
outlined here:

Hope this helps,

-JOn Sat, Dec 7, 2013 at 6:55 AM, vikaskhairnar@commusoft.co.uk wrote:

Hi,

My old accounts Aceess token’s are expired, I want to refresh it using
refreshtoken API
which you provided but I have one issue that I don’t have refreshtoken of
that my old accounts, how to get that which API should I use?


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774

Sorry…

I have :

  • client ID
  • client secret

But Not:

Sorry, now I’m really confused: you don’t have an authorisation code. but
you have a client secret and an authorisation code?

-J

On Mon, Dec 9, 2013 at 12:03 PM, Vikas Khairnar < vikaskhairnar@commusoft.co.uk> wrote:

not this

  • an authorisation code(refresh token)
    I have other 2

  • client secret

  • an authorisation cod

On 9 December 2013 17:31, Jonathan Barrett jonathan@freeagent.comwrote:

Okay, so my understanding is that you have the following items:

  • client ID
  • client secret
  • an authorisation code

is this correct?

-J


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.

To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Actually I have to refresh my tokens
I have authorization code but not refresh tokens of my old accounts
which is required for refreshing access token’sOn 9 December 2013 17:15, Jonathan Barrett jonathan@freeagent.com wrote:

Hi Vikas,

If you haven’t stored an authorisation code for the account you’re trying
to access, you’ll need to re-authorise your application against that
account, as detailed in the docs:

FreeAgent Developer Dashboard

Once you have that, you can retrieve an access token as usual, and
subsequently refresh that token with the authorisation code as required.

-J

On Mon, Dec 9, 2013 at 11:40 AM, Vikas Khairnar < vikaskhairnar@commusoft.co.uk> wrote:

But I don’t have refresh token’s of my old accounts to refresh my token
and authorization(as you said) take me to new user connection

On 9 December 2013 17:00, Jonathan Barrett jonathan@freeagent.comwrote:

Hi there,

To request a new access token, you should simply be able to use the
initial authorisation codehttps://dev.freeagent.com/docs/oauth#the-authorisation-request,
as outlined here:

FreeAgent Developer Dashboard

Hope this helps,

-J

On Sat, Dec 7, 2013 at 6:55 AM, vikaskhairnar@commusoft.co.uk wrote:

Hi,

My old accounts Aceess token’s are expired, I want to refresh it using
refreshtoken API
which you provided but I have one issue that I don’t have refreshtoken
of that my old accounts, how to get that which API should I use?


You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to freeagent_api+unsubscribe@googlegroups.com.

To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.

To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Okay, gotcha. Well, in that case, you need to get an authorisation code.
This involves making a request to the app using your ID and secret, and
then logging into the app using the username and password of the freeagent
account you want access to. This will then return an authorisation code
which you can use to get access tokens for making requests for that account.

This process is detailed in the developer documentation:

Hope this helps,

-JOn Mon, Dec 9, 2013 at 12:10 PM, Vikas Khairnar < vikaskhairnar@commusoft.co.uk> wrote:

Sorry…

I have :

  • client ID
  • client secret

But Not:

  • an authorisation code

On 9 December 2013 17:36, Jonathan Barrett jonathan@freeagent.com wrote:

Sorry, now I’m really confused: you don’t have an authorisation code. but
you have a client secret and an authorisation code?

-J

On Mon, Dec 9, 2013 at 12:03 PM, Vikas Khairnar < vikaskhairnar@commusoft.co.uk> wrote:

not this

  • an authorisation code(refresh token)
    I have other 2

  • client secret

  • an authorisation cod

On 9 December 2013 17:31, Jonathan Barrett jonathan@freeagent.comwrote:

Okay, so my understanding is that you have the following items:

  • client ID
  • client secret
  • an authorisation code

is this correct?

-J


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to freeagent_api+unsubscribe@googlegroups.com.

To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774

Really thanks for your help, but I am a developer and didn’t know my
client’s username/password so need to get authorization code without
re-authorizing it is it any way for this?On 9 December 2013 17:44, Jonathan Barrett jonathan@freeagent.com wrote:

Okay, gotcha. Well, in that case, you need to get an authorisation code.
This involves making a request to the app using your ID and secret, and
then logging into the app using the username and password of the freeagent
account you want access to. This will then return an authorisation code
which you can use to get access tokens for making requests for that account.

This process is detailed in the developer documentation:
FreeAgent Developer Dashboard

Hope this helps,

-J

On Mon, Dec 9, 2013 at 12:10 PM, Vikas Khairnar < vikaskhairnar@commusoft.co.uk> wrote:

Sorry…

I have :

  • client ID
  • client secret

But Not:

  • an authorisation code

On 9 December 2013 17:36, Jonathan Barrett jonathan@freeagent.comwrote:

Sorry, now I’m really confused: you don’t have an authorisation code.
but you have a client secret and an authorisation code?

-J

On Mon, Dec 9, 2013 at 12:03 PM, Vikas Khairnar < vikaskhairnar@commusoft.co.uk> wrote:

not this

  • an authorisation code(refresh token)
    I have other 2

  • client secret

  • an authorisation cod

On 9 December 2013 17:31, Jonathan Barrett jonathan@freeagent.comwrote:

Okay, so my understanding is that you have the following items:

  • client ID
  • client secret
  • an authorisation code

is this correct?

-J


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to freeagent_api+unsubscribe@googlegroups.com.

To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Ok, but I didn’t get this bold part, how to do "re-authorise your
application against that accoun"

If you haven’t stored an authorization code for the account you’re trying
to access, you’ll need to re-authorise your application against that
account
, as detailed in the docs:On 9 December 2013 17:23, Jonathan Barrett jonathan@freeagent.com wrote:

Hi Vikas,

Ah, I see the confusion here: the “refresh token” is the authorisation
code. From the docshttps://dev.freeagent.com/docs/oauth#refreshing-the-access-token
:

To refresh an access token, the app makes an HTTP Basic Auth POST to the

FreeAgent Token Endpoint https://api.freeagent.com/v2/token_endpointusing the Client ID as the username and Client Secret as the password and
including the following in the POST body:

  • grant_type=refresh_token (required)

  • refresh_token (required) the authorisation code received earlier

Hope this helps,

-J

On Mon, Dec 9, 2013 at 11:51 AM, Vikas Khairnar < vikaskhairnar@commusoft.co.uk> wrote:

Actually I have to refresh my tokens
I have authorization code but not refresh tokens of my old accounts
which is required for refreshing access token’s

On 9 December 2013 17:15, Jonathan Barrett jonathan@freeagent.comwrote:

Hi Vikas,

If you haven’t stored an authorisation code for the account you’re
trying to access, you’ll need to re-authorise your application against that
account, as detailed in the docs:

FreeAgent Developer Dashboard

Once you have that, you can retrieve an access token as usual, and
subsequently refresh that token with the authorisation code as required.

-J

On Mon, Dec 9, 2013 at 11:40 AM, Vikas Khairnar < vikaskhairnar@commusoft.co.uk> wrote:

But I don’t have refresh token’s of my old accounts to refresh my token
and authorization(as you said) take me to new user connection

On 9 December 2013 17:00, Jonathan Barrett jonathan@freeagent.comwrote:

Hi there,

To request a new access token, you should simply be able to use the
initial authorisation codehttps://dev.freeagent.com/docs/oauth#the-authorisation-request,
as outlined here:

FreeAgent Developer Dashboard

Hope this helps,

-J

On Sat, Dec 7, 2013 at 6:55 AM, vikaskhairnar@commusoft.co.uk wrote:

Hi,

My old accounts Aceess token’s are expired, I want to refresh it
using refreshtoken API
which you provided but I have one issue that I don’t have
refreshtoken of that my old accounts, how to get that which API should I
use?


You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it,
send an email to freeagent_api+unsubscribe@googlegroups.com.

To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.

To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

But I don’t have refresh token’s of my old accounts to refresh my token and
authorization(as you said) take me to new user connectionOn 9 December 2013 17:00, Jonathan Barrett jonathan@freeagent.com wrote:

Hi there,

To request a new access token, you should simply be able to use the
initial authorisation codehttps://dev.freeagent.com/docs/oauth#the-authorisation-request,
as outlined here:

FreeAgent Developer Dashboard

Hope this helps,

-J

On Sat, Dec 7, 2013 at 6:55 AM, vikaskhairnar@commusoft.co.uk wrote:

Hi,

My old accounts Aceess token’s are expired, I want to refresh it using
refreshtoken API
which you provided but I have one issue that I don’t have refreshtoken
of that my old accounts, how to get that which API should I use?


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.

To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Sorry, now I’m really confused: you don’t have an authorisation code. but
you have a client secret and an authorisation code?

-JOn Mon, Dec 9, 2013 at 12:03 PM, Vikas Khairnar < vikaskhairnar@commusoft.co.uk> wrote:

not this

  • an authorisation code(refresh token)
    I have other 2

  • client secret

  • an authorisation cod

On 9 December 2013 17:31, Jonathan Barrett jonathan@freeagent.com wrote:

Okay, so my understanding is that you have the following items:

  • client ID
  • client secret
  • an authorisation code

is this correct?

-J


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774

Hi Vikas,

Ah, I see the confusion here: the “refresh token” is the authorisation
code. From the docshttps://dev.freeagent.com/docs/oauth#refreshing-the-access-token
:

To refresh an access token, the app makes an HTTP Basic Auth POST to the

FreeAgent Token Endpoint https://api.freeagent.com/v2/token_endpointusing the Client ID as the username and Client Secret as the password and
including the following in the POST body:

  • grant_type=refresh_token (required)

  • refresh_token (required) the authorisation code received earlier

Hope this helps,

-JOn Mon, Dec 9, 2013 at 11:51 AM, Vikas Khairnar < vikaskhairnar@commusoft.co.uk> wrote:

Actually I have to refresh my tokens
I have authorization code but not refresh tokens of my old accounts
which is required for refreshing access token’s

On 9 December 2013 17:15, Jonathan Barrett jonathan@freeagent.com wrote:

Hi Vikas,

If you haven’t stored an authorisation code for the account you’re trying
to access, you’ll need to re-authorise your application against that
account, as detailed in the docs:

FreeAgent Developer Dashboard

Once you have that, you can retrieve an access token as usual, and
subsequently refresh that token with the authorisation code as required.

-J

On Mon, Dec 9, 2013 at 11:40 AM, Vikas Khairnar < vikaskhairnar@commusoft.co.uk> wrote:

But I don’t have refresh token’s of my old accounts to refresh my token
and authorization(as you said) take me to new user connection

On 9 December 2013 17:00, Jonathan Barrett jonathan@freeagent.comwrote:

Hi there,

To request a new access token, you should simply be able to use the
initial authorisation codehttps://dev.freeagent.com/docs/oauth#the-authorisation-request,
as outlined here:

FreeAgent Developer Dashboard

Hope this helps,

-J

On Sat, Dec 7, 2013 at 6:55 AM, vikaskhairnar@commusoft.co.uk wrote:

Hi,

My old accounts Aceess token’s are expired, I want to refresh it using
refreshtoken API
which you provided but I have one issue that I don’t have
refreshtoken of that my old accounts, how to get that which API should I
use?


You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to freeagent_api+unsubscribe@googlegroups.com.

To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.

To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774

Hi Vikas,

The point of the OAuth system is that applications need to gain the
explicit consent of the account owner before they can access data. In
essence, you’re asking if it’s possible to access your client’s data
without them authorising your app to do so. The answer is no: you’ll need
to get someone there to explicitly allow access to their data.

If this is an app for a single client (and not one where anyone can set up
an account, for example), then your client may be happy to create a
FreeAgent user for you which is dedicated to API access. You could then use
this account to authorise your app.

Cheers,

-JOn Mon, Dec 9, 2013 at 12:18 PM, Vikas Khairnar < vikaskhairnar@commusoft.co.uk> wrote:

Really thanks for your help, but I am a developer and didn’t know my
client’s username/password so need to get authorization code without
re-authorizing it is it any way for this?

On 9 December 2013 17:44, Jonathan Barrett jonathan@freeagent.com wrote:

Okay, gotcha. Well, in that case, you need to get an authorisation code.
This involves making a request to the app using your ID and secret, and
then logging into the app using the username and password of the freeagent
account you want access to. This will then return an authorisation code
which you can use to get access tokens for making requests for that account.

This process is detailed in the developer documentation:
FreeAgent Developer Dashboard

Hope this helps,

-J

On Mon, Dec 9, 2013 at 12:10 PM, Vikas Khairnar < vikaskhairnar@commusoft.co.uk> wrote:

Sorry…

I have :

  • client ID
  • client secret

But Not:

  • an authorisation code

On 9 December 2013 17:36, Jonathan Barrett jonathan@freeagent.comwrote:

Sorry, now I’m really confused: you don’t have an authorisation code.
but you have a client secret and an authorisation code?

-J

On Mon, Dec 9, 2013 at 12:03 PM, Vikas Khairnar < vikaskhairnar@commusoft.co.uk> wrote:

not this

  • an authorisation code(refresh token)
    I have other 2

  • client secret

  • an authorisation cod

On 9 December 2013 17:31, Jonathan Barrett jonathan@freeagent.comwrote:

Okay, so my understanding is that you have the following items:

  • client ID
  • client secret
  • an authorisation code

is this correct?

-J


You received this message because you are subscribed to a topic in
the Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to freeagent_api+unsubscribe@googlegroups.com.

To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774

Hi Vikas,

If you haven’t stored an authorisation code for the account you’re trying
to access, you’ll need to re-authorise your application against that
account, as detailed in the docs:

Once you have that, you can retrieve an access token as usual, and
subsequently refresh that token with the authorisation code as required.

-JOn Mon, Dec 9, 2013 at 11:40 AM, Vikas Khairnar < vikaskhairnar@commusoft.co.uk> wrote:

But I don’t have refresh token’s of my old accounts to refresh my token
and authorization(as you said) take me to new user connection

On 9 December 2013 17:00, Jonathan Barrett jonathan@freeagent.com wrote:

Hi there,

To request a new access token, you should simply be able to use the
initial authorisation codehttps://dev.freeagent.com/docs/oauth#the-authorisation-request,
as outlined here:

FreeAgent Developer Dashboard

Hope this helps,

-J

On Sat, Dec 7, 2013 at 6:55 AM, vikaskhairnar@commusoft.co.uk wrote:

Hi,

My old accounts Aceess token’s are expired, I want to refresh it using
refreshtoken API
which you provided but I have one issue that I don’t have refreshtoken
of that my old accounts, how to get that which API should I use?


You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to freeagent_api+unsubscribe@googlegroups.com.

To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.

To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774

not this

  • an authorisation code(refresh token)
    I have other 2
  • client secret
  • an authorisation codOn 9 December 2013 17:31, Jonathan Barrett jonathan@freeagent.com wrote:

Okay, so my understanding is that you have the following items:

  • client ID
  • client secret
  • an authorisation code

is this correct?

-J


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/Stal4Xi1ENU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.