<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Can't figure out how to fix this error (code 401 : Multiple authentications invoked) in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-figure-out-how-to-fix-this-error-code-401-Multiple/m-p/367431#M36242</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to use a script on Googlesheet to add data to a spreadsheet and do BI. (I followed this tutorial: &lt;A href="https://goo.gl/64hQZb)" target="_blank"&gt;https://goo.gl/64hQZb)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a developer account with a CLIENT ID and a CLIENT SECRET and when calling the URL in the parameters (paged?hapikey=...) I put the API key of my company's CRM. Moreover, during the first call of refresh() I am asked to open a hubspot authorization URL that asks me to choose an account between my developer account and my company's CRM account, I chose the second one to link the script to my CRM. (Anyway I understood this from the tutorial which does not detail this step at all).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, after authorizing the script on the hubspot side, I run refresh() again and I get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{"status":"error","message":"&lt;STRONG&gt;Multiple authentications invoked! (oauth-token,hapikey). Use only one.&lt;/STRONG&gt;","correlationId":"a4d3d32c-8460-40d7-b945-6b82ff3b6795"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[GoogleSheet side (fr)]&lt;BR /&gt;Échec de la requête pour &lt;A href="https://api.hubapi.com" target="_blank"&gt;https://api.hubapi.com&lt;/A&gt;. &lt;U&gt;Code renvoyé&amp;nbsp;: 401&lt;/U&gt;. Réponse tronquée du serveur&amp;nbsp;: {"status":"error","message":"&lt;STRONG&gt;Multiple authentications invoked! (oauth-token,hapikey). Use only one.&lt;/STRONG&gt;","correlationId":"a4d3d32c-8460-40d7-b945-6b82... (Utilisez l'option muteHttpExceptions pour examiner la réponse entière.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone explain me how can I get rid of this error ? I found nothing about it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 04 Sep 2020 06:53:30 GMT</pubDate>
    <dc:creator>Maxime_Datapy</dc:creator>
    <dc:date>2020-09-04T06:53:30Z</dc:date>
    <item>
      <title>Can't figure out how to fix this error (code 401 : Multiple authentications invoked)</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-figure-out-how-to-fix-this-error-code-401-Multiple/m-p/367431#M36242</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to use a script on Googlesheet to add data to a spreadsheet and do BI. (I followed this tutorial: &lt;A href="https://goo.gl/64hQZb)" target="_blank"&gt;https://goo.gl/64hQZb)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a developer account with a CLIENT ID and a CLIENT SECRET and when calling the URL in the parameters (paged?hapikey=...) I put the API key of my company's CRM. Moreover, during the first call of refresh() I am asked to open a hubspot authorization URL that asks me to choose an account between my developer account and my company's CRM account, I chose the second one to link the script to my CRM. (Anyway I understood this from the tutorial which does not detail this step at all).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, after authorizing the script on the hubspot side, I run refresh() again and I get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{"status":"error","message":"&lt;STRONG&gt;Multiple authentications invoked! (oauth-token,hapikey). Use only one.&lt;/STRONG&gt;","correlationId":"a4d3d32c-8460-40d7-b945-6b82ff3b6795"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[GoogleSheet side (fr)]&lt;BR /&gt;Échec de la requête pour &lt;A href="https://api.hubapi.com" target="_blank"&gt;https://api.hubapi.com&lt;/A&gt;. &lt;U&gt;Code renvoyé&amp;nbsp;: 401&lt;/U&gt;. Réponse tronquée du serveur&amp;nbsp;: {"status":"error","message":"&lt;STRONG&gt;Multiple authentications invoked! (oauth-token,hapikey). Use only one.&lt;/STRONG&gt;","correlationId":"a4d3d32c-8460-40d7-b945-6b82... (Utilisez l'option muteHttpExceptions pour examiner la réponse entière.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone explain me how can I get rid of this error ? I found nothing about it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 06:53:30 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-figure-out-how-to-fix-this-error-code-401-Multiple/m-p/367431#M36242</guid>
      <dc:creator>Maxime_Datapy</dc:creator>
      <dc:date>2020-09-04T06:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can't figure out how to fix this error (code 401 : Multiple authentications invoked)</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-figure-out-how-to-fix-this-error-code-401-Multiple/m-p/368227#M36298</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/143872"&gt;@Maxime_Datapy&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on the error, it seems to imply that you're using two authentication type to send a particular HubSpot endpoint.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, if you're looking to use the&amp;nbsp;&lt;A href="https://legacydocs.hubspot.com/docs/methods/contacts/get_contacts" target="_blank"&gt;Get all contacts | Contacts API&lt;/A&gt;&amp;nbsp;&amp;gt; you would either need to use the &lt;STRONG&gt;hapikey&lt;/STRONG&gt; OR &lt;STRONG&gt;OAuth access token&lt;/STRONG&gt; as the authentication type to authenticate the request.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're using both the hapikey and OAuth access token, I believe you would receive the multiple authentication invoked error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As such, to resolved can you either use the portal's hapikey or oauth access token to authenticate the request?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 06:22:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-figure-out-how-to-fix-this-error-code-401-Multiple/m-p/368227#M36298</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2020-09-08T06:22:11Z</dc:date>
    </item>
  </channel>
</rss>

