Jump to content

Sage Business Accounting - Test Account


 Share

Recommended Posts

I am a C# .NET developer who builds booking systems for a range of clients.  I am looking to integrate these booking systems with Sage Business Accounting so that I can post invoices and receipts to/from my client's Sage accounts.  I already have a Sage Developer account and access to the API documentation but I would like to have a test Sage account so that I can post and retrieve test transactions.  I've previously signed up for a Sage Trial account ([email protected]) but the trial period has now expired and I can no longer access the account.  Please advise on how I can obtain a test account a.s.a.p. in order that I can get started on my integration.

Link to comment
Share on other sites

Mark

Thank you.  When I log in it still tells me that I need to enter payment details.  I have another account registered to [email protected] which has another 195 days to run on the trial, so I can use this one for now.

I am trying to connect to this count using oAuth2 in C# to obtain a valid Token and RefreshToken.  Here's the URL I am using

https://www.sageone.com/oauth2/auth?response_type=code&client_id=CLIENT_ID&redirect_uri=REDIRECT_URL&scope=full_access

where CLIENT_ID = a30eb717-391c-c6df-1a18-4318a848e1a6/f26c306d-bad2-4425-a5e1-0aa435eb489b and REDIRECT_URL = https://localhost:44385/confirmsage.  This is the client ID set up for an app called GoAdventures in my Sage developer portal

This URL takes me to the Sage login screen where I use my [email protected] login.  However, when the login completes I see the message below.  Could you advise me where I'm going wrong - I was hoping this URL would redirect with session variables containing a Token and RefreshToken

Authorise application

Error

We are very sorry, but there has been a problem. Please try again.

If you continue to have issues then please email [email protected] or call the Customer Service Team on 0845 111 6611 - UK or 1890 812 811 - Ireland

Link to comment
Share on other sites

Thanks @Paul Grimster,

It looks as if the expiry date has not been synced with one of the required services. That's been passed to our support team to be addressed and we'll let you know once complete.

Looking at the callback URL's you have registered against the app, https://localhost:44385/confirmsage does not appear to be listed?

https://developer.sage.com/accounting/guides/authenticating/oauth-troubleshooting/

Thanks

Mark

Screenshot 2024-07-16 at 11.50.33.png

Link to comment
Share on other sites

Mark

 

I have now updated the callback URL's to include https://localhost;44385/confirmsage but I'm still receiving the same error message.  I don't know what else I can do to establish the connection.  Please help/advice.

Kind Regards

Paulimage.png.4fe4cce141f80b6eeaae68cbbcf107f7.png

image.png.4fe4cce141f80b6eeaae68cbbcf107f7.png

Authorise application

Error

We are very sorry, but there has been a problem. Please try again.

If you continue to have issues then please email [email protected] or call the Customer Service Team on 0845 111 6611 - UK or 1890 812 811 - Ireland

Link to comment
Share on other sites

Thanks @Paul Grimster,

Which part of the oAuth handshake is the error being returned at?

If it's just after you've entered the user details for the test business this implies the callback URl cannot be reached. Are you able to manually access https://localhost:44385/confirmsage after the user auth and if so do you see the code.

For reference we have a C# example app available from https://developer.sage.com/accounting/guides/getting-started/sample_apps/.

Have you been able to create a connection through a known good client such as POSTMAN? https://developer.sage.com/accounting/quick-start/create-your-first-request/

There's a small POSTMAN collection and environment available from the below link which uses a script to exchange access_tokens stored in the environment.

https://drive.google.com/file/d/1cxvieOD6tVFXqssbYQmM4qLp9_6a0BRN/view?usp=drive_link.

You can follow the guide at https://developer.sage.com/accounting/quick-start/preparing-to-create-test-data/ as far as the authentication and storing of tokens is concerned.

Once you've got the auth working in POSTMAN you'll be able to see the requests and params in the console which you can then compare to what is being sent from your app. It's usually the encoding of body params where problems occur.

Let me know if you get stuck with POSTMAN and we can arrange a quick call to get you setup.
 
Thanks

Mark

 

Link to comment
Share on other sites

Mark

I have now deployed the callback URL to a live server rather than localhost and made sure that the Callback URL exists.  The call I'm making to the oAuth system is

https://app.sageone.com/oauth2/auth?response_type=code&client_id=a30eb717-391c-c6df-1a18-4318a848e1a6%2Ff26c306d-bad2-4425-a5e1-0aa435eb489b&redirect_uri=https%3A%2F%2Fgoadventures.angelfishbooking.co.uk%2Fauthcallback&scope=full_access

The callback URL definitely exists as you can see here 

https://goadventures.angelfishbooking.co.uk/authcallback

I have set up the CallbackURL in my GoAdventures application as you will see.  However, I'm still receiving the authorisation error below once I've logged into my Sage Account.

Can you offer any further assistance please, or arrange a call with someone?

Kind Regards

Paul

Authorise application

Error

We are very sorry, but there has been a problem. Please try again.

If you continue to have issues then please email [email protected] or call the Customer Service Team on 0845 111 6611 - UK or 1890 812 811 - Ireland

Link to comment
Share on other sites

Thanks @Paul Grimster,

If you install the POSTMAN app and import the collection and environment I referenced yesterday we can get this setup.

You'll need to add the POSTMAN callback URL(https://www.postman.com/oauth2/callback) to your app in addition to https://goadventures.angelfishbooking.co.uk/authcallback.

Once you've done that PM me with two or three optional times and i'll setup a call.

We've seen some client id's that haven't seeded correctly recently so we need to rule that out.

Link to comment
Share on other sites

Mark

Thank you for the quick response.  I already have POSTMAN installed and I've imported your environment and collection.

I am free for a call tomorrow morning between 10 and 11.30, or any time after 10 on Monday or Tuesday next week.

Kind Regards

Paul

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...