Closed jmawebtech closed 8 years ago
Hi @jmawebtech,
It looks like you're not using the correct content type to authorize your request. You should use the content-type "application/x-www-form-urlencoded" as defined in the following file:
https://github.com/LinnSystems/LinnworksNetSDK/blob/master/Linnworks/src/net/LinnworksAPI/Factory.cs
You also appear to be using eu1 as the server. For authorization requests, you should always use the api.linnworks.net server.
You shouldn't have any issues with this if you're using the code provided here, as it should set the content type correctly. Would you be able to confirm this?
Yes, that works thanks.
sir plz send me the integration code of API
hi how we update linnworks price from local data base using API
Hi,
I am trying to pull a list of orders from my LinnWorks account. I have some questions:
Inside of my application, I clicked the install link and I received a token. When I call the method, I get a 400 bad request. My URL is https://eu1.linnworks.net/api/Auth/AuthorizeByApplication. Am I posting to the wrong URL?
Here is my request:
POST https://eu1.linnworks.net//api/Auth/AuthorizeByApplication HTTP/1.1 Accept: application/json Content-Type: application/json Host: eu1.linnworks.net Content-Length: 148 Expect: 100-continue Connection: Keep-Alive
applicationId=XX&applicationSecret=XX&token=XX
Response
HTTP/1.1 400 Bad Request Cache-Control: no-cache Pragma: no-cache Content-Type: application/json; charset=utf-8 Expires: -1 Server: Microsoft-IIS/8.5 Access-Control-Allow-Origin: Access-Control-Allow-Headers: Access-Control-Allow-Credentials: false X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Access-Control-Allow-Headers: Authorization, Origin, X-Requested-With, Content-Type, Accept, Accept-Language Access-Control-Allow-Methods: GET, POST, OPTIONS Access-Control-Allow-Credentials: true Date: Sat, 06 Feb 2016 17:52:13 GMT Content-Length: 37
{"Message":"The request is invalid."}