Confused on how to get authentication working

Hello. I am new to the Sage API and have had lots of issues/confusion trying to get the authentication process to work. I created an app and applied the client id and secret to postman as specified in your getting started doc. After I entered my email and password to authenticate, I would get errors returned from your server but I have no idea what they are. I just see a page stating there was an error. I tried calling for help but that was completely useless as it would hang up after telling me to go online for help.

It seems like I need to create a trial account as well to get the authentication to work. If that is true, I am confused then why I needed to create my app in the first place.

Here is what I entered in postman.

sage_postman.pdf

  • Hi,
    Can you confirm the callback URL you registered your app with please? If you're using your app in the Postman environment you'll need to ensure the callback URL is set to https://www.getpostman.com/oauth2/callback. A screen shot of the error would be good too.

    Sage Business Cloud Accounting follows the OAuth 2.0 authorisation protocol. You register your app with Sage at https://developerselfservice.sageone.com/session/new and obtain your app's individual client id and secret. You are then able to send a request containing your app's credentials as listed in https://developer.sage.com/api/accounting/guides/authentication/ to obtain an authorisation code for your app. If your app app is authenticated the app user (yourself in this scenario) will be redirected to select the region your business is located and then enter the user credentials for the SBC Accounting business the app intends to integrate with. If the authentication is successful the sage auth server will return a bearer token which you must add in each request you make. V3.1 API tokens are valid for 5 mins or 300 seconds, after this time you would exchange the refresh token for a new token.

    "It seems like I need to create a trial account as well to get the authentication to work." - The purpose of authorising is to authenticate the calling app and then allow it access to a business. Without an account to authenticate with you would not be able to complete the full auth handshake and make requests.

  • I ended up getting this to work. Had to take a break and clear my head. Thanks

  • Thanks for letting us know. Please reach out to us if you require any further assistance.