Daniel Gray Posted March 18, 2022 Share Posted March 18, 2022 Hi, I am trying to receive an access token for using the Sage Business Cloud Accounting API. I'm using Postman as per the guide: https://developer.sage.com/accounting/guides/authenticating/postman/. The login screen loads the first time and I click my region (South Africa), the page reloads with "Internal Server Error". Every attempt after that loads the same error page. I'm using: https://www.sageone.com/oauth2/auth for the auth url, and https://oauth.accounting.sage.com/token for the Access Token Url. All other details are as per the guide and my App details page. Thank you! Link to comment Share on other sites More sharing options...
Steel, Mark Posted March 18, 2022 Share Posted March 18, 2022 Hi Daniel, thank you for your question. The version of Sage Business Cloud Accounting available in South Africa is a different product to the SBCA product documented here, and requires the use of a different API. As such there is a different site available to give you details etc. You can find the pages here: Developer API - Sage Business Cloud Accounting | Sage South Africa The page has links to register your app for use with this API, details on the auth process and a full API specification. Thanks Mark Link to comment Share on other sites More sharing options...
Team Paul Posted February 15, 2023 Share Posted February 15, 2023 Hi, I am trying to receive an access token for using the Sage Business Cloud Accounting API. I'm using Postman as per the guide: https://developer.sage.com/accounting/guides/authenticating/postman/. The login screen loads the first time and I click my region (UK), the page reloads with "Internal Server Error". Every attempt after that loads the same error page. I'm using: https://www.sageone.com/oauth2/auth for the auth url, and https://oauth.accounting.sage.com/token for the Access Token Url. All other details are as per the guide and my App details page. Thank you! Link to comment Share on other sites More sharing options...
Steel, Mark Posted February 15, 2023 Share Posted February 15, 2023 Hi, what is the email address you are using to authenticate with please? Feel free to send it in a direct message if you don't wish to make it public. Thanks Mark Link to comment Share on other sites More sharing options...
Team Paul Posted February 15, 2023 Share Posted February 15, 2023 Hi Mark, I am using same email which i have used to Create Developer account .i.e. [email protected]. Link to comment Share on other sites More sharing options...
Steel, Mark Posted February 15, 2023 Share Posted February 15, 2023 Thanks, That's not going to work. You need to auth against a business as per this guide. Link to comment Share on other sites More sharing options...
Steel, Mark Posted February 15, 2023 Share Posted February 15, 2023 The auth flow is the owner of a business granting access to your application. It is the business owners email address and password that is required and not your app credentials. The app credentials are known from the params passed in the auth request. Link to comment Share on other sites More sharing options...
Team Paul Posted February 15, 2023 Share Posted February 15, 2023 Hi mark, business owners email address and password is also not working. we are getting issue . please see screen attached. Login eror.pdf Link to comment Share on other sites More sharing options...
Steel, Mark Posted February 15, 2023 Share Posted February 15, 2023 Can you send me the parameters that you send in the auth URl please. You'll need to hide your client_id and secret. The auth redirect should be taking you to the country selection if not set as a query param and then to the user auth grant attached. Link to comment Share on other sites More sharing options...
Team Paul Posted February 15, 2023 Share Posted February 15, 2023 Hi Mark, Please see below Details: Auth URL: https://www.sageone.com/oauth2/auth/central?filter=apiv3.1 Access Token URL: https://oauth.accounting.sage.com/token CallBack URL: https://https://localhost:44389/auth/callback Link to comment Share on other sites More sharing options...
Steel, Mark Posted February 15, 2023 Share Posted February 15, 2023 The callback URL you've set doesn't look correct. If you're using the POSTMAN app try using the POSTMAN callbackurl - https://www.postman.com/oauth2/callback first before moving on to your localhost callback. You'll also need to add this to your app registry callback urls. I would also change the Client Authentication to Send as Basic Auth header. It looks as if the images we have in the docs are out of date and could do with updating. Thanks Mark Link to comment Share on other sites More sharing options...
Team Paul Posted February 15, 2023 Share Posted February 15, 2023 Thanks Mark. The issue was on callback URL. Link to comment Share on other sites More sharing options...
Team Paul Posted February 16, 2023 Share Posted February 16, 2023 Hello Mark, Could you please assist in fixing the "A remote failure has occurred: The oauth state was missing or invalid." error? This error is getting while trying to generate a token from the C# code sample given at GitHub - Sage/sageone_api_csharp_sample: Sage One API - C# Sample. Link to comment Share on other sites More sharing options...
Steel, Mark Posted February 20, 2023 Share Posted February 20, 2023 What have you changed in the config of the C# sample app GitHub - Sage/sageone_api_csharp_sample: Sage One API - C# Sample? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now