<?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 Re: Cannot get an access token - unknown grant type in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223322#M2218</link>
    <description>&lt;P&gt;Not it says "{&lt;BR /&gt;
"status": "BAD_CLIENT_ID",&lt;/P&gt;
&lt;P&gt;"message": "missing or unknown client id","&lt;/P&gt;
&lt;P&gt;I think it worked now I have to get new client id.&lt;/P&gt;
&lt;P&gt;But the same client id was used to get the code.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Dec 2018 14:44:02 GMT</pubDate>
    <dc:creator>brij</dc:creator>
    <dc:date>2018-12-10T14:44:02Z</dc:date>
    <item>
      <title>Cannot get an access token - unknown grant type</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223314#M2210</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am trying to get access token for a user, but I keep receiving &lt;CODE&gt;"status":"BAD_GRANT_TYPE","message":"missing or unknown grant type"&lt;/CODE&gt;. I have tried encoding query params or passing them as one json param, but nothing worked.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;payload = {
    'grant_type': 'authorization_code',
    'client_id': 'f6***',
    'client_secret': 'f2***',
    'redirect_uri': 'https://sc***/',
    'code': '5f***'
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;requests.post('https://api.hubapi.com/oauth/v1/token?', params=payload)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Sep 2017 09:11:56 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223314#M2210</guid>
      <dc:creator>esthom</dc:creator>
      <dc:date>2017-09-21T09:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get an access token - unknown grant type</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223315#M2211</link>
      <description>&lt;P&gt;&lt;A class="mention" href="https://community.hubspot.com/u/esthom"&gt;@esthom&lt;/A&gt; Are you setting your content-type in the headers? Should be&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;Content-Type: application/x-www-form-urlencoded;charset=utf-8&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;Sometimes not having the correct content-type can throw off a server trying to read your request.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 13:14:18 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223315#M2211</guid>
      <dc:creator>3PETE</dc:creator>
      <dc:date>2017-09-21T13:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get an access token - unknown grant type</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223316#M2212</link>
      <description>&lt;P&gt;Thanks &lt;A class="mention" href="https://community.hubspot.com/u/pmanca"&gt;@pmanca&lt;/A&gt;, that worked fine!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 15:29:41 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223316#M2212</guid>
      <dc:creator>esthom</dc:creator>
      <dc:date>2017-10-09T15:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get an access token - unknown grant type</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223317#M2213</link>
      <description>&lt;P&gt;&lt;A class="mention" href="https://community.hubspot.com/u/pmanca"&gt;@pmanca&lt;/A&gt;  I seem to be having the same issue. Not sure why however. the header on postman is as you describe it along with the body data.&lt;/P&gt;
&lt;P&gt;header image: &lt;A href="https://ibb.co/bOVrAm" rel="nofollow noopener"&gt;https://ibb.co/bOVrAm&lt;/A&gt;&lt;BR /&gt;
body image: &lt;A href="https://ibb.co/d6Rni6" rel="nofollow noopener"&gt;https://ibb.co/d6Rni6&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Any ideas would be greatly appreciated.&lt;/P&gt;
&lt;P&gt;thx&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 15:55:56 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223317#M2213</guid>
      <dc:creator />
      <dc:date>2017-10-27T15:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get an access token - unknown grant type</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223318#M2214</link>
      <description>&lt;P&gt;&lt;A class="mention" href="https://community.hubspot.com/u/sphot"&gt;@sphot&lt;/A&gt; Can you send along the full image of your body?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 18:17:23 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223318#M2214</guid>
      <dc:creator>3PETE</dc:creator>
      <dc:date>2017-11-01T18:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get an access token - unknown grant type</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223319#M2215</link>
      <description>&lt;P&gt;Hi, I'm having the same problem with Postman, how could you solve it?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 14:25:06 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223319#M2215</guid>
      <dc:creator>macarlucho</dc:creator>
      <dc:date>2018-08-15T14:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get an access token - unknown grant type</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223320#M2216</link>
      <description>&lt;P&gt;But not working for me even after chnaging the order as follows:&lt;BR /&gt;
grant_type=authorization_code&lt;BR /&gt;
&amp;amp;client_id=xxx&lt;BR /&gt;
&amp;amp;client_secret=xxx&lt;BR /&gt;
&amp;amp;redirect_uri=https://api.hubapi.com/contacts/v1/lists/all/contacts/all&lt;BR /&gt;
&amp;amp;code=code_here&lt;/P&gt;
&lt;P&gt;And adding " &lt;CODE&gt;Content-Type: application/x-www-form-urlencoded;charset=utf-8&lt;/CODE&gt;"&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/2/2e27fcd253a3d74bd27d4088581822b00f41d121.png" alt="image" width="467" height="326" /&gt;&lt;/P&gt;
&lt;ASIDE class="quote no-group quote-modified" data-post="1" data-topic="6005"&gt;
&lt;DIV class="title"&gt;
&lt;DIV class="quote-controls"&gt;&lt;/DIV&gt;
&lt;IMG alt="" width="20" height="20" src="https://avatars.discourse.org/v2/letter/e/f6c823/40.png" class="avatar" /&gt; esthom:&lt;/DIV&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;having the correct content-type can throw off a server trying to read your request.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/ASIDE&gt;</description>
      <pubDate>Mon, 10 Dec 2018 10:27:42 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223320#M2216</guid>
      <dc:creator>brij</dc:creator>
      <dc:date>2018-12-10T10:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get an access token - unknown grant type</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223321#M2217</link>
      <description>&lt;P&gt;Welcome, &lt;A class="mention" href="https://community.hubspot.com/u/brij"&gt;@brij&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Per &lt;A href="https://developers.hubspot.com/docs/methods/oauth2/get-access-and-refresh-tokens" rel="nofollow noopener"&gt;this documentation&lt;/A&gt;, you must include &lt;CODE&gt;grant_type&lt;/CODE&gt;, &lt;CODE&gt;client_id&lt;/CODE&gt;, &lt;CODE&gt;client_secret&lt;/CODE&gt;, &lt;CODE&gt;redirect_uri&lt;/CODE&gt;, and &lt;CODE&gt;code&lt;/CODE&gt; in the &lt;STRONG&gt;&lt;EM&gt;request body&lt;/EM&gt;&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;You are trying to include those parameters as headers, but the only header should be &lt;CODE&gt;Content-Type: application/x-www-form-urlencoded;charset=utf-8&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 14:13:06 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223321#M2217</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2018-12-10T14:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get an access token - unknown grant type</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223322#M2218</link>
      <description>&lt;P&gt;Not it says "{&lt;BR /&gt;
"status": "BAD_CLIENT_ID",&lt;/P&gt;
&lt;P&gt;"message": "missing or unknown client id","&lt;/P&gt;
&lt;P&gt;I think it worked now I have to get new client id.&lt;/P&gt;
&lt;P&gt;But the same client id was used to get the code.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 14:44:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223322#M2218</guid>
      <dc:creator>brij</dc:creator>
      <dc:date>2018-12-10T14:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get an access token - unknown grant type</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223323#M2219</link>
      <description>&lt;P&gt;Hi, &lt;A class="mention" href="https://community.hubspot.com/u/brij"&gt;@brij&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Are you still experiencing this error? I was unsure whether your last post said you got it working.&lt;/P&gt;
&lt;P&gt;The &lt;CODE&gt;client_id&lt;/CODE&gt; you should use is located in your app settings. If you need help finding this, please share your developer Hub ID and app ID.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 15:07:09 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223323#M2219</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2018-12-11T15:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get an access token - unknown grant type</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223324#M2220</link>
      <description>&lt;P&gt;It worked now, please remove my last response.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2018 12:34:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223324#M2220</guid>
      <dc:creator>brij</dc:creator>
      <dc:date>2018-12-12T12:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get an access token - unknown grant type</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223325#M2221</link>
      <description>&lt;P&gt;Glad to hear it, &lt;A class="mention" href="https://community.hubspot.com/u/brij"&gt;@brij&lt;/A&gt;! I've deleted the post you requested.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2018 15:09:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223325#M2221</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2018-12-12T15:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get an access token - unknown grant type</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223326#M2222</link>
      <description>&lt;P&gt;&lt;A class="mention" href="https://community.hubspot.com/u/isaac_takushi"&gt;@Isaac_Takushi&lt;/A&gt; Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2018 16:44:42 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/223326#M2222</guid>
      <dc:creator>brij</dc:creator>
      <dc:date>2018-12-12T16:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get an access token - unknown grant type</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/292564#M27248</link>
      <description>&lt;P&gt;Hi, I am encountering similar issues with the curl response. In POSTMAN I am able to get a successful response, but when I replicate the settings in PHP with cURL, I am getting a "BAD_GRANT_TYPE" response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Content Type should be set properly in the request. But I notice in the curl response, it shows content_type = application/json, is that correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any suggestions? Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-09-21 at 1.19.42 AM.png" style="width: 373px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/20052iEBF62432E7A82DEF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-09-21 at 1.19.42 AM.png" alt="Screen Shot 2019-09-21 at 1.19.42 AM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-09-21 at 1.22.46 AM.png" style="width: 422px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/20053iCBAC8B84422A25E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-09-21 at 1.22.46 AM.png" alt="Screen Shot 2019-09-21 at 1.22.46 AM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-09-21 at 1.24.10 AM.png" style="width: 573px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/20054i5CDBF9F79C6F6BFA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-09-21 at 1.24.10 AM.png" alt="Screen Shot 2019-09-21 at 1.24.10 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Sep 2019 06:31:09 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/292564#M27248</guid>
      <dc:creator>yan_hero_power</dc:creator>
      <dc:date>2019-09-21T06:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get an access token - unknown grant type</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/363075#M35735</link>
      <description>&lt;P&gt;I am facing this problem, even though supplying the required params in the header and request body respectively as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ContentHeader" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/30454i896BD2170251BD76/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ContentType.jpg" alt="ContentHeader" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;ContentHeader&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Body" style="width: 375px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/30455i2CDCF88034C363DF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RequestBody.jpg" alt="Body" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Body&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the error I face:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Error Window" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/30456i87A2CC56223C2BA9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Error.jpg" alt="Error Window" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Error Window&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2020 12:28:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/363075#M35735</guid>
      <dc:creator>samarr</dc:creator>
      <dc:date>2020-08-19T12:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get an access token - unknown grant type</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/954024#M72463</link>
      <description>&lt;P&gt;Looking for the same answer for my site.i am running a social grant company website that hosted on wordpress and i want to run it multiple network.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 14:29:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Cannot-get-an-access-token-unknown-grant-type/m-p/954024#M72463</guid>
      <dc:creator>AAbdullah6</dc:creator>
      <dc:date>2024-04-03T14:29:03Z</dc:date>
    </item>
  </channel>
</rss>

