Jump to content

RJ98

Members
  • Posts

    10
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi there, I've had this issue a few times, but I normally just re-run the code on another day and it ends up working. However, it is becoming a bit more of a problem now. But I'm getting responses that contain HTML. The HTML renders a page that states looks like this: Umm... something went wrong There seems to have been a slight problem. Bad gateway The web server reported a bad gateway error. Ray ID: <Ray ID> Your IP address: <IP Address> Error reference number: 502 Cloudflare Location: <Location> I have no idea why this is being returned from an API request. Is this due to too many requests being made? But it is causing issues with error handling as the logs become massive because the HTML code is long that is sent back from the API request. Any idea what could be the problem here? Thanks
  2. Hi @Steel, Mark, I'm still getting the same error message. This is the body that I am passing: { 'stock_movement': { 'stock_item_id': 'exampleID', 'date': '2022-04-21', 'quantity': 1.0, 'cost_price': 0.01, 'details': 'Stock increase for online order' } } It keeps saying A malformed request body was sent to the API. Any ideas?
  3. I am using the stock items endpoint using the updates product PUT method here is my request: url = "https://api.accounting.sage.com/v3.1/stock_items/{key}".format( key=product_id ) headers = { "Content-Type": "application/json", "Authorization": "Bearer " + access_token, } payload = {"stock_item": {"quantity_in_stock": new_quantity}} response = requests.request("PUT", url, headers=headers, data=payload) The new_quantity is a double/float data type. The JSON returned from the API was that a malformed API request was sent. Any ideas on what I am getting wrong? Thanks
  4. Here is the URL I use to load the Sage Log in UI. I have removed the client_id from the URL for security purposes. Is this the correct format: https://www.sageone.com/oauth2/auth/central?filter=apiv3.1&response_type=code?client_id=someclientid123&redirect_uri=https://www.myapp.co.uk/account/platforms/platformredirect/&response_type=code&scope=full_access&prompt=login&state={'platform': 'sage'} Thanks
  5. @Steel, Mark I have the full URL here that causes the error. It is the redirect uri to my app. This is it: https://myapp.co.uk/account/platforms/platformredirect/?error=temporarily_unavailable&error_description=The+backend+service+is+temporarily+not+available.+Please+try+again+later.&state={'platform'%3A+'sage'} I think normally the access code is where the error parameter is. Why would sage be generating this as a parameter? Thanks
  6. @Steel, Mark Hi Mark, yes the 500 error appears after the user has authorised the app. I have double checked, and I have set the app name in the settings. I pass a state parameter too when the log in page for sage loads, could this be affecting this and does this get passed back through to the redirect uri. My app login for sage has been working for a while, have any major updates happened to the API in the last few months that could affect my code which could be creating the server 500 error, with the backend error? Thanks
  7. @Steel, Mark Also when it asks me to give permission on my account, it doesn't come up with the name of my app on the permission screen, where its meant to be before the "is" at the start of the page
  8. @Steel, Mark Yes I have been able to authenticate via my app in the past, and I'm also able to login via the UI on sage one. Is this error referencing the backend on my app most likely?
  9. Hi there, I've been having an issue when I try to log in to sage via my app. I keep getting a server 500 error and I keep getting this error in the URL: error=temporarily_unavailable&error_description=The+backend+service+is+temporarily+not+available.+Please+try+again+later. Is this an issue on my side, or on the backend of sage? Thank you
  10. I have a program that creates a product if it does not exist within Sage. The problem we have is that it is creating the products as a Stock product, where as by default we want all added products to be a Non-Stock product. Thank you for any help
×
×
  • Create New...