Forum Discussion

skihappy's avatar
skihappy
Experienced Partner
3 years ago
Solved

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, 

2 Replies

Replies have been turned off for this discussion
  • Hannah_B's avatar
    Hannah_B
    MYOB Moderator

    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, 

    • skihappy's avatar
      skihappy
      Experienced Partner

      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