Jump to content

Christian de Bellefeuille

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Christian de Bellefeuille

  1. 1 minute ago, Christian de Bellefeuille said:

    Ok it work now!   I've deleted all my variables, one by one.  And it seems the URL was causing the problem.  I've been able to get a New Access Token.

     

    I've tried to do a simple request from the API Contacts (countries / Return all countries) but i've got a message like 

    Your access token has expired. You can refresh the token or ask the user for a new grant.

    I've refreshed the token, did the request again but still have the same error. 

     

    Christian

    nevermind.  Had few token in my postman list... cleared them all, then requested a new one, and tried the endpoint again and it work perfectly.

    Thanks a lot for your help Ben!   I'll see what was wrong with my callback url variable so i can use them again properly.

    • Like 1
  2. 24 minutes ago, Ben Smith said:

    Ok, thanks for the update - if you clear all cookies in Postman then try again what do you get?

     

    Ben

    Ok it work now!   I've deleted all my variables, one by one.  And it seems the URL was causing the problem.  I've been able to get a New Access Token.

     

    I've tried to do a simple request from the API Contacts (countries / Return all countries) but i've got a message like 

    Your access token has expired. You can refresh the token or ask the user for a new grant.

    I've refreshed the token, did the request again but still have the same error. 

     

    Christian

  3. I didn't knew how to clear cookies within Postman for Desktop, so i've opened it from their web site.   Cleared the cookies of course in Google Chrome, but i'm still having the same issue.  I've made sure to pick English Canada first because by default it's English US.   

    I've checked the Service Status but there's only a problem in Africa.  North America is green.

  4. 9 hours ago, Ben Smith said:

    Hi Christian, 

    The trial account is 100% usable via the API, I've sent you a private message asking for your email address for the accounting business and I can extend that for 12 months for you free of charge. 

    Looking closely at the postman variables - it looks as though the client_secret isn't being passed as a valid variable. It shows in red on the token auth screen - when you look at your variables it looks like there might be a line break character showing (I've attached a screenshot of what I mean). 

    Screenshot 2021-02-03 at 09.00.21.png

    Can you clear the variable name, and try it again for me please?

     

    Ben

     

    Thanks for the 12 months trial for the API tests.  

     

    I didn't noticed this "CR" character at the end.  I've removed it, and went a step further.  It told me that it would send a code by email.  So i've copied the code from the email in this field, submit, then it brought me back to the same error windows that i had before.  And now if i test again and again, it doesn't ask for code anymore.

     

    Christian

  5. 12 hours ago, Ben Smith said:

    Can I confirm you have:

    1. Access to a trial account for Sage Business Cloud Accounting (with the required permissions - you might need to speak to your coworker to confirm that in Settings > User Management (ideally ensure that they have given you full access).
    2. Registered an application in our app registry (https://developerselfservice.sageone.com/) - the callback URL you enter here must be exactly the same as you pass during authentication.

    How are you using the API currently, are you scoping it out using Postman or in your own application?

    Also, do you have an accounting business associated with the email address you are using to authenticate with?

     

    Hi Ben,

    I've just done the following test:

    • created a new Free Trial account for Sage Accounting with another email address
    • created a new company DB from scratch
    • created a new Developer Account with the same email used for Sage Accounting Free Trial
    • created an App in it, with correct callback url
    • changed the client id and client secret in my postman

    By doing this, i'm sure that:

    • It's not because i'm not the owner of the db
    • It's not because i'm testing from an import from a really old version of Simply Accounting Pro 2009

    But still have the same issue.

    The more i dig, the more i think it's an issue with the "Free Trial".  They probably don't give access to the API for Trial.  I'll create a non-trial account to see if it fix the problem.

     

    Christian

  6. 3 hours ago, Ben Smith said:

    9 times out of 10, the error you have received relates to an issue with the callback URL you are using during authentication. 

    Can I confirm you have:

    1. Access to a trial account for Sage Business Cloud Accounting (with the required permissions - you might need to speak to your coworker to confirm that in Settings > User Management (ideally ensure that they have given you full access).
    2. Registered an application in our app registry (https://developerselfservice.sageone.com/) - the callback URL you enter here must be exactly the same as you pass during authentication.

    How are you using the API currently, are you scoping it out using Postman or in your own application?

    Also, do you have an accounting business associated with the email address you are using to authenticate with?

     

    I've got full access as you can see bellow.

    image.thumb.png.20c9c996a904f0e17b742307be679ac2.png

     

    As for which version i'm using, it's hard to say.  I know that my coworker activated the trial for "Sage Accounting Start", but then had to switch to "Sage Accounting" which is more complete (because he couldn't import our older version in it).

    image.thumb.png.f157824e4e6d21a2b6fcf621bad7e043.png

     

    I've also got my app registered with the proper callback URL

    image.thumb.png.5937f86502d221351b17739997647dc8.png

    We are using Postman for the test purpose, but it will be used in our application when our tests will be completed.  Here's my postman request for new Token.  I've set some variables for the client id, client secret and the callback url

    image.thumb.png.83e13efdf28957f3471b3958f7763d88.png

    image.thumb.png.31a29c09e0b317f4f0028485c83f4ff5.png

     

    And to answer your last question, i use the same email for Sage Accounting, and Sage Developer Accounting.  For our Sage Accounting i'm a user with Full Access as you saw previously, i'm just not the owner and i don't know if that make a difference.  This morning i'll create a developer account with my coworker email, create an app, change all my client ID & Secret & Call back URL to see if it fix anything.

    Thanks for your help

    Christian

     

     

    image.png

    image.png

  7. On 1/25/2021 at 8:36 AM, Ben Smith said:

    Hi Guiheneuf,

    Can I ask which region of Accounting you are working with - are you using a trial account? 

    You will need to ensure you have access to an Accounting Business, and its the email address and password you sign in with, that you must authenticate using in Postman. 

    If you ensure you've cleared your cookies in Postman which will give you the region selection option during authentication also. 

     

    If you still need to create a trial, please go here for links to all of our regions: https://developer.sage.com/api/accounting/guides/faq/

    Thanks,

     

    Ben

    Hi Ben,

    We have the same issue described here, but we are using the Sage Cloud Business account, not Sage 50.   But we are on a Trial version for the moment because we want to evaluate if it will answer all our needs.

    Is it a limitation of the Free Trial?  The error is slightly different so i've included the screenshot.

    You seems to say that the developer account email should be the same as the owner of the Sage Cloud Business account?  That may also be my issue because the owner is a coworker.  He gave me full access, but i'm not the owner of it.

    Thanks for your help

    Image Pasted at 2021-2-1 15-41.png

×
×
  • Create New...