AutID Posted May 14, 2016 Posted May 14, 2016 I am trying to get Spotify User's playlists via http requests using WinHTTP.au3. Now according to their site, application's requests authorization should look something like this. #include "WinHttp.au3" Local $hOpen = _WinHttpOpen('Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)') Local $sURL = "https://accounts.spotify.com/authorize/?" Local $ClientId = "26d287105e31491889f3cd293d85bfea" Local $ResponseType = "code" Local $sRedirectURI = "http://localhost:8000" Local $aState = "XSS" Local $aURL = $sURL & "client_id=" & $ClientId & "&response_type=" & $ResponseType & "&redirect_uri=" & $sRedirectURI & "&state=" & $aState & "&scope=playlist-read-private user-read-private user-read-email user-library-read user-follow-read user-read-birthdate" Local $hConnect = _WinHttpConnect($hOpen, $aURL) Local $sData = _WinHttpSimpleSSLRequest($hConnect) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) ConsoleWrite($sData & @CRLF) This would work on a browser however I am not sure http requests support these kind of request. Normally on a browser at this point the user is asked to authorize the access by submitting his credentials in case they are not saved. He is then redirected to the Redirect uri and granted access. So my questions are simple. Before loosing too much time on this for nothing, is it possible to achieve what I'm trying to? If yes, what should my next step be? https://iblockify.wordpress.com/
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now