Method Community

 

Authorization Error using API Key

Last post 10-22-2024 2:02 PM by Method_Inderdeep. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 10-27-2023 9:54 PM

    Authorization Error using API Key

    Greetings,

    I recently created my Method trial account and just completed syncing my QuickBooks company file.  I would like to use the REST API to retrieve customer records and other data.  I created a new API key using the Integrations/API section of my dashboard.  I then downloaded the sample Postman collection to run some tests.

    Using Postman, I set the authentication type to API Key and entered the key to be passed in the HTTP headers.  In my authorization header, my key name is "APIKey" and the value is my generated key from the dashboard.  I am sending requests to https://rest.method.me, but all are being rejected with a 401 (unauthorized).  My understanding is that I do not need to use the OAuth flow, and simply sending the API key in the authorization header is sufficient.  I have not performed any other user-related setup other than generating the key.

    Any suggestions on what I may be doing wrong?

    Thank you.


  • 10-28-2023 2:36 PM In reply to

    Re: Authorization Error using API Key

    Hey,

    Based on your post I think you might have the wrong value in the Key field.

    Here is an example of how I have my postman headers setup. Hope this helps.

    Screenshot-2023-10-28-at-3-28-19-PM



    Michael Melo
    Product Manager
    Method Integration Inc.
    Website: http://www.method.me
    LinkedIn: http://www.linkedin.com/in/MichaelMelo
  • 10-28-2023 3:29 PM In reply to

    Re: Authorization Error using API Key

    You're exactly right... I had "APIKey" as the key value instead of "Authorization".  Changing my setup to match yours fixed the issue.

    Thanks so much!

  • 10-22-2024 9:39 AM In reply to

    • 48b
    • Not Ranked
    • Joined on 10-21-2024
    • Posts 1

    Re: Authorization Error using API Key

    I am getting the same error using the api. I am using zapier and am needing to update a customer here is what my PATCH method looks like. Hoping you can help. Thank you.

  • 10-22-2024 2:02 PM In reply to

    Re: Authorization Error using API Key

    Hi 48b,

    Can you make sure under the Authorization where you are using the API key the prefix of that key should be 'APIKey' followed by a space and then the TheActualKey'? 

    Here is an example:

    APIKey ThisIsAnExample.

    -Inder

Page 1 of 1 (5 items)