InvalidTokenException: Unauthorized-401

前端 未结 1 1162
轮回少年
轮回少年 2020-12-12 06:58

I am converting a application to use IPP .net API V3. I have already built all the OAuth and saved the token info. Trying to make connection but always get error. I have c

相关标签:
1条回答
  • 2020-12-12 07:34

    You can try this call as mentioned in the following docs using IPP provided .net devkit.

    https://developer.intuit.com/docs/0025_quickbooksapi/0055_devkits/0150_ipp_.net_devkit_3.0/0002_synchronous_calls/0001_data_service_apis

    401 clearly signifies that your OAuth tokens/request header is not correct. To debug this, you can use any standard RestClients ( like RestClient plugins of Mozilla browser or Fiddler) where you can set four OAuth tokens [ consumer key, consumer Secret, access Key and access token) and content-type [application/xml]

    • URI: https://quickbooks.api.intuit.com/v3/company//customer
    • Method: POST
    • Content-Type: application/xml

    Mozilla RestClient -

    Set OAuth Tokens

    enter image description here

    Set Content-type ( in header )

    enter image description here

    enter image description here https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/030_entity_services_reference/customer

    If the above approach works, that means your OAuth tokens are fine. You need to check and properly construct the header using devdefined then.

    If it doesn't work then you need to generate a new set of access Token and Secret using IPP OAuth Playground.

    https://appcenter.intuit.com/Playground/OAuth

    Thanks

    0 讨论(0)
提交回复
热议问题