<?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: Token endpoint via PowerShell in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Token-endpoint-via-PowerShell/m-p/6002257#M13432</link>
    <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Necroposting, I know, but i had a similar challenge, and it makes sense to have it here where others may come for help&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Authorization"&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"Basic "&lt;/SPAN&gt; &lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN&gt; [&lt;/SPAN&gt;&lt;SPAN&gt;convert&lt;/SPAN&gt;&lt;SPAN&gt;]::ToBase64STring([&lt;/SPAN&gt;&lt;SPAN&gt;system.text.encoding&lt;/SPAN&gt;&lt;SPAN&gt;]::ascii.getbytes(&lt;/SPAN&gt;&lt;SPAN&gt;$client_id&lt;/SPAN&gt; &lt;SPAN&gt;+&lt;/SPAN&gt; &lt;SPAN&gt;":"&lt;/SPAN&gt; &lt;SPAN&gt;+&lt;/SPAN&gt; &lt;SPAN&gt;$client_Secret&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 12 Apr 2024 12:54:56 GMT</pubDate>
    <dc:creator>DarthMuppet</dc:creator>
    <dc:date>2024-04-12T12:54:56Z</dc:date>
    <item>
      <title>Token endpoint via PowerShell</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Token-endpoint-via-PowerShell/m-p/5035144#M1132</link>
      <description>&lt;P&gt;Hey all. Anyone have success using Powershell to interact with the Spotify API? I’ve been able to capture to auth code but I’m getting a “something went wrong” back when trying to use Invoke-Restmethod to the /token endpoint. I’ve got the base64 client id/secret and the auth code but I can’t tell why it’s failing and there is no context from the response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Operating System&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Windows 10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Sep 2020 16:06:25 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Token-endpoint-via-PowerShell/m-p/5035144#M1132</guid>
      <dc:creator>shaioshin</dc:creator>
      <dc:date>2020-09-13T16:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Token endpoint via PowerShell</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Token-endpoint-via-PowerShell/m-p/5035219#M1133</link>
      <description>I had the exact same issue. The alternative method of supplying them in the message body worked fine though. It's not mentioned for the token refresh but works there as well.&lt;BR /&gt;&lt;BR /&gt;So I have it working, but I'd love to know why using the base64/header method refuses to work too.&amp;nbsp;</description>
      <pubDate>Sun, 13 Sep 2020 21:18:37 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Token-endpoint-via-PowerShell/m-p/5035219#M1133</guid>
      <dc:creator>PMental</dc:creator>
      <dc:date>2020-09-13T21:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Token endpoint via PowerShell</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Token-endpoint-via-PowerShell/m-p/5035269#M1134</link>
      <description>&lt;P&gt;Thanks. I’ll give that a shot.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Sep 2020 23:21:26 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Token-endpoint-via-PowerShell/m-p/5035269#M1134</guid>
      <dc:creator>shaioshin</dc:creator>
      <dc:date>2020-09-13T23:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Token endpoint via PowerShell</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Token-endpoint-via-PowerShell/m-p/5205713#M2546</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Could you please share the below concept for a newbie like myself:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to properly achieve &lt;STRONG&gt;&lt;FONT color="#000000"&gt;the base64 encoding of the&lt;BR /&gt;"client_id:client_secret"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;that's needed in the step "1. Have your application request authorization"&lt;BR /&gt;from the &lt;A href="https://developer.spotify.com/documentation/general/guides/authorization-guide/#client-credentials-flow" target="_self"&gt;Client Credentials Flow&lt;/A&gt; ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've done it using the &lt;FONT color="#000000"&gt;certUtil&lt;/FONT&gt; tool from Windows command-line.&lt;BR /&gt;It reads the &amp;lt;client_id:client_secret&amp;gt; string from input.txt and writes the encoding into output.txt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;certUtil -encode input.txt output.txt&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The encoded string contains a newline character in the output.txt,&lt;BR /&gt;which doesn't help the cURL request, if I remove it ...&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="certUtil.PNG" style="width: 546px;"&gt;&lt;img src="https://community.spotify.com/t5/image/serverpage/image-id/129224i9283F84CF4152F36/image-size/large?v=v2&amp;amp;px=999" role="button" title="certUtil.PNG" alt="certUtil.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I get an Invalid Client error&lt;BR /&gt;(but I'm sure it has to do with the newline from the encoded output string).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Spotify's cURL command is:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;curl -X "POST"&lt;BR /&gt;-H "Authorization: Basic &lt;STRONG&gt;&lt;FONT color="#000000"&gt;&amp;lt;base64 encoded client_id:client_secret&amp;gt;&lt;/FONT&gt;&lt;/STRONG&gt;"&lt;BR /&gt;-d grant_type=client_credentials&lt;BR /&gt;&lt;A href="https://accounts.spotify.com/api/token" target="_blank" rel="noopener"&gt;https://accounts.spotify.com/api/token&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Much appreciated.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 16 May 2021 07:24:59 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Token-endpoint-via-PowerShell/m-p/5205713#M2546</guid>
      <dc:creator>Solid_Tester</dc:creator>
      <dc:date>2021-05-16T07:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Token endpoint via PowerShell</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Token-endpoint-via-PowerShell/m-p/6002257#M13432</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Necroposting, I know, but i had a similar challenge, and it makes sense to have it here where others may come for help&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Authorization"&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"Basic "&lt;/SPAN&gt; &lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN&gt; [&lt;/SPAN&gt;&lt;SPAN&gt;convert&lt;/SPAN&gt;&lt;SPAN&gt;]::ToBase64STring([&lt;/SPAN&gt;&lt;SPAN&gt;system.text.encoding&lt;/SPAN&gt;&lt;SPAN&gt;]::ascii.getbytes(&lt;/SPAN&gt;&lt;SPAN&gt;$client_id&lt;/SPAN&gt; &lt;SPAN&gt;+&lt;/SPAN&gt; &lt;SPAN&gt;":"&lt;/SPAN&gt; &lt;SPAN&gt;+&lt;/SPAN&gt; &lt;SPAN&gt;$client_Secret&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 12 Apr 2024 12:54:56 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Token-endpoint-via-PowerShell/m-p/6002257#M13432</guid>
      <dc:creator>DarthMuppet</dc:creator>
      <dc:date>2024-04-12T12:54:56Z</dc:date>
    </item>
  </channel>
</rss>

