Unable to Login

Hi Freeagent Team,

I am a web developer, and i want to integrate freeagent accounting
information to my web. so that our common clients can access their
accounting information. i sign up freeagent account as a trial. it allows
me to login when i log in using “http://edgexport.freeagent.com
but i am facing problem when i access it through the coding of your API.

i obtained URL through coding:
https://api.sandbox.freeagent.com/v2/approve_app?response_type=code&client_id=b82ba9171b2859177597800feab2438f9d819d01ef&redirect_uri=http%3A%2F%2Fgoogle.com&state=foo

when i past it into my browser then it will redirect me to URL: *
https://api.sandbox.freeagent.com/v2/login* here when i put my mail and
password of freeagent trial account; then it shows me error that “Email or
password not recognized” while it is working for me on
http://edgexport.freeagent.com.

Please help me out. I am waiting your positive reply.

Regards and Thanks,
Cheesa
Web Developer, Ambosco, Shereserve.

Hi Freeagent Team,

I am a web developer, and i want to integrate freeagent accounting
information to my web. so that our common clients can access their
accounting information. i sign up freeagent account as a trial. it allows
me to login when i log in using “http://edgexport.freeagent.com
but i am facing problem when i access it through the coding of your API.

i obtained URL through coding: *
https://api.sandbox.freeagent.com/v2/approve_app?response_type=code&client_id=b82ba9171b2859177597800feab2438f9d819d01ef&redirect_uri=http%3A%2F%2Fgoogle.com&state=foo

when i past it into my browser then it will redirect me to URL: *
https://api.sandbox.freeagent.com/v2/login* here when i put my mail and
password of freeagent trial account; then it shows me error that “Email or
password not recognized” while it is working for me on
http://edgexport.freeagent.com.

Please help me out. I am waiting your positive reply.

Regards and Thanks,
*Cheesa
Web Developer, Ambosco, Shereserve.

Hi Cheesa,

Thanks for getting in touch, and sorry you’re having trouble here.

Can I ask if you’ve run through the “quick start” guide that Caius directed
you to? https://dev.freeagent.com/docs/quick_start

Going through that step by step should help you get set up with creating an
app and ensuring it can be authorised against your sandbox account.

Cheers,

-JOn Monday, 15 July 2013 06:59:01 UTC+1, Cheesa wrote:

On Friday, July 12, 2013 4:28:00 PM UTC+5, Caius Durling wrote:

Hi Cheesa,

You’ve registered a production account and then tried to login to the
sandbox with those credentials, which is why it will be failing to log you
in. (The sandbox exists to allow people to play around with the API without
having to use a production freeagent account.) You will either need to go
to https://signup.sandbox.freeagent.com/signup and create a sandbox
account, then use that to login as you’ve already tried. Or use the
production API endpoints, by changing api.sandbox.freeagent.com to
api.freeagent.com in the approve_app URL you’re using, and then sign in
with the exgexport credentials you’ve already created.

I also suggest reading our quick start document if you’ve not come across
it already, https://dev.freeagent.com/docs/quick_start :slight_smile:

Hope that helps!
Caius

Hi Cheesa

This looks like you might be using my FreeAgent client for .NET?

If so, there is sample code in the test project:

You will need to add a file into there called “KeyStorage.cs” which
has the keys in used for testing (you can get these either by running
the tests and getting the values out, or use the google sandbox
thing). I dont include it because it has MY keys in there.

To get the AppKey/AppSecret, you go to https://dev.freeagent.com/ and
make an app - both of them are in there.

Then, you get the refresh token when you first connect:

https://dev.freeagent.com/docs/oauth

and with that, you can get a new AccessToken for each session (they
last 86400 seconds, so I suggest you get one, do your work, then throw
it away and get a new one for the next “run”)

The callbackUri that you have there is NOT your freeagent app, it’s
the app you are trying to connect. So lets say you are writing
CheesaTimeTracker.com, your user starts on

http://cheesatimetracker.com/login

they hit a button to connect to freeagent, which takes them to
http://api.freeagent.com/whatever, they login etc. On the last screen
of the freeagent but, they are then redirected to

http://cheesatimetracker.com/something

this url (/something) needs to capture the various oauth tokens (which
are get parameters, eg /something?code=big-long-hex-number)

Or you can use the API:

//pass in the full URL, it’ll find the code=<> bit…
string code = client.ExtractCodeFromUrl(url);
var newToken = client.GetAccessToken (code, callbackUri);

the newToken is where you find the RefreshToken and AccessToken

KeyStorage.cs:

using System;
namespace ConsoleRunner
{
public partial class MainClass
{
public static string AppKey = “This comes from the freeagent dashboard”;
public static string AppSecret = “So does this”;

    public static string RefreshToken = "xxxxxx";

    public static string SandboxAccessToken = "xxxxxx";
    public static string BigTedAccessToken = "xxxxxx";
}

}On 15 July 2013 09:51, Jonathan Barrett jonathan@freeagent.com wrote:

Hi Cheesa,

Thanks for getting in touch, and sorry you’re having trouble here.

Can I ask if you’ve run through the “quick start” guide that Caius directed
you to? https://dev.freeagent.com/docs/quick_start

Going through that step by step should help you get set up with creating an
app and ensuring it can be authorised against your sandbox account.

Cheers,

-J

On Monday, 15 July 2013 06:59:01 UTC+1, Cheesa wrote:

On Friday, July 12, 2013 4:28:00 PM UTC+5, Caius Durling wrote:

Hi Cheesa,

You’ve registered a production account and then tried to login to the
sandbox with those credentials, which is why it will be failing to log you
in. (The sandbox exists to allow people to play around with the API without
having to use a production freeagent account.) You will either need to go to
https://signup.sandbox.freeagent.com/signup and create a sandbox account,
then use that to login as you’ve already tried. Or use the production API
endpoints, by changing api.sandbox.freeagent.com to api.freeagent.com in the
approve_app URL you’re using, and then sign in with the exgexport
credentials you’ve already created.

I also suggest reading our quick start document if you’ve not come across
it already, https://dev.freeagent.com/docs/quick_start :slight_smile:

Hope that helps!
Caius


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.

Nic Wise
t. +44 7788 592 806 | @fastchicken
b. http://www.fastchicken.co.nz/

Hi Cheesa,

You’ve registered a production account and then tried to login to the
sandbox with those credentials, which is why it will be failing to log you
in. (The sandbox exists to allow people to play around with the API without
having to use a production freeagent account.) You will either need to go
to https://signup.sandbox.freeagent.com/signup and create a sandbox
account, then use that to login as you’ve already tried. Or use the
production API endpoints, by changing api.sandbox.freeagent.com to
api.freeagent.com in the approve_app URL you’re using, and then sign in
with the exgexport credentials you’ve already created.

I also suggest reading our quick start document if you’ve not come across
it already, https://dev.freeagent.com/docs/quick_start :slight_smile:

Hope that helps!
Caius

Thanks Caius!

I Registered sandbox account. now i am able to log in with the system…but
here another problem when i log in to the system through URL obtain from
code then it show following message.

Sorry, there’s been a problem.(We don’t recognise this app. Please use your
browser’s back button to return to the app which sent you here.)

My Code is:

        FreeAgentClient.UseSandbox = true;
        AccessToken accessToken= new AccessToken();

        FreeAgentClient _client = new FreeAgentClient("apiKey", 

“appSecret”);
string callbackUri = “http://edgexport.freeagent.com”;
string url = _client.BuildAuthorizeUrl(callbackUri);

Please help me now what should i do now?On Friday, July 12, 2013 4:28:00 PM UTC+5, Caius Durling wrote:

Hi Cheesa,

You’ve registered a production account and then tried to login to the
sandbox with those credentials, which is why it will be failing to log you
in. (The sandbox exists to allow people to play around with the API without
having to use a production freeagent account.) You will either need to go
to https://signup.sandbox.freeagent.com/signup and create a sandbox
account, then use that to login as you’ve already tried. Or use the
production API endpoints, by changing api.sandbox.freeagent.com to
api.freeagent.com in the approve_app URL you’re using, and then sign in
with the exgexport credentials you’ve already created.

I also suggest reading our quick start document if you’ve not come across
it already, https://dev.freeagent.com/docs/quick_start :slight_smile:

Hope that helps!
Caius

Hi Cheesa,

You’ve registered a production account and then tried to login to the
sandbox with those credentials, which is why it will be failing to log you
in. (The sandbox exists to allow people to play around with the API without
having to use a production freeagent account.) You will either need to go
to https://signup.sandbox.freeagent.com/signup and create a sandbox
account, then use that to login as you’ve already tried. Or use the
production API endpoints, by changing api.sandbox.freeagent.com to
api.freeagent.com in the approve_app URL you’re using, and then sign in
with the exgexport credentials you’ve already created.

I also suggest reading our quick start document if you’ve not come across
it already, https://dev.freeagent.com/docs/quick_start :slight_smile:

Hope that helps!
Caius