API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

getting "Unauthorized access (unauthorized)" when posting new invoice

0

Hi, I am posting a new invoice with valid appId, accessId and valid data but still i am getting the following response (in iOS through Afnetworking)

{"message":"Unauthorized access (Unauthorized).","developerHint":"Please take a look at https://restapi.e-conomic.com and follow the links to help on authorization, or use the word demo for both tokens.","logId":"f18527c2-f8df-4448-a48c-47d0fbec1b16","httpStatusCode":401,"demoLink":"https://restapi.e-conomic.com/invoices-experimental/drafts?demo=true","logTime":"2015-05-26T08:25:19"}

I have a valid e-conomic account and have created fresh appIds and accessIds several times. Can anyone let me know what's the problem. And yes, the same accessId and appId is working correctly in jsfiddle with the same data. I am hitting this url -> https://restapi.e-conomic.com/invoices-experimental/drafts

created May 26, 2015 by ibrahimamazai
0% Accept Rate

edited May 26, 2015 by ibrahimamazai
Q 1 A 0 C 0

1 Answer

0
Hi Ibrahim

 

A good idea would be to use a proxy that allows you to debug what you're actually sending.

For windows theres the free Fiddler and for Mac there's an app like Charles.

Knowing what you're transmitting over the lines is a crucial step in debugging what's going on with REST.
answered Jun 22, 2015 by olej
Visma e-conomic A/S
...