error 401 unauthorized creating service invoice, but can create item invoice

This thread is now closed to new comments.
Some of the links and information provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
skihappy
Experienced Partner
25 Posts
Experienced Partner
Australia
Experienced Partner

25Posts

3Kudos

0Solutions

Solved: Go to Solution

error 401 unauthorized creating service invoice, but can create item invoice

 
2 REPLIES 2
Hannah_B
MYOB Moderator
142 Posts
MYOB Moderator
Australia
MYOB Moderator

142Posts

33Kudos

25Solutions

Accepted Solution Solved

Re: error 401 unauthorized creating service invoice, but can create item invoice

HI @skihappy ,

 

Thanks for reaching out, The error 401 Unauthorised is normally caused by single sign-on being enabled from the front end of the program. When single sign-on has been enabled this means you are not required to pass the CFtoken header via the API.

 

If you remove the CFtoken header and complete a request is this now successful?

 

Single Sign on: https://apisupport.myob.com/hc/en-us/articles/360001479716-Single-Sign-on-SSO-and-cftoken

 

If the above does not resolve the issue this leads me to think that you might not have full user access to the file. 

 

Thanks, 


Thanks,
@Hannah_B


MYOB API Specialist


MYOB API Support Centre|MYOB App Marketplace|MYOB AccountRight API Endpoint Doc's



Did my answer help?


Mark it as a Solution

skihappy
Experienced Partner
25 Posts
Experienced Partner
Australia
Experienced Partner

25Posts

3Kudos

0Solutions

Re: error 401 unauthorized creating service invoice, but can create item invoice

removing the "cftoken" header still had same issue

 

noticed that cftoken was "blank"

checked and found my credentials was being reset before the insert operation, 

fixed the reset operation

 

checking the "cftoken" confirmed  cftoken was correct for user , now working

 

Thanks

 

Didn't find your answer here?

Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post