Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QOAuth2AuthorizationCodeFlow accessing Spotify
Forum Updated to NodeBB v4.3 + New Features

QOAuth2AuthorizationCodeFlow accessing Spotify

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 821 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    canellas
    wrote on 24 May 2018, 21:57 last edited by
    #1

    I am trying to make this project to work.

    I changed mainwindow.cpp:22 to use my Client Id, and mainwindow.cpp:23 to use my Client Secret, that I registered for my app at Spotify.

    But it does not matter which Redirect URI I set for my app registration, at Spotify, this example uses redirect_uri=http://localhost/:8080 in the URL. I tried to edit it to redirect_uri=https://localhost/:8080, as I (think I) read somewhere, but with no results: the browser reports INVALID_CLIENT: Invalid redirect URI.

    I also tried to insert replyHandler->setProperty("redirect_uri", "https://localhost:8080/"); after line 19.

    I also read this, this and this, but I just couldn't get it to work.

    Later, I had the idea to clear the "data of the hosted app" in the browser's cache (I dont know if that's the English name, as my browser runs in pt-br) , and the login page at last appeared!!

    I have to click 3 times on the Login button for the Gotcha to appear (click on the images with cars, etc), but nothing happens in the browser or in the app. I even created a premium account at Spotify, but it made no difference.

    Any help will be much appreciated!!

    Thanks!

    R 1 Reply Last reply 25 May 2018, 11:13
    0
    • C canellas
      24 May 2018, 21:57

      I am trying to make this project to work.

      I changed mainwindow.cpp:22 to use my Client Id, and mainwindow.cpp:23 to use my Client Secret, that I registered for my app at Spotify.

      But it does not matter which Redirect URI I set for my app registration, at Spotify, this example uses redirect_uri=http://localhost/:8080 in the URL. I tried to edit it to redirect_uri=https://localhost/:8080, as I (think I) read somewhere, but with no results: the browser reports INVALID_CLIENT: Invalid redirect URI.

      I also tried to insert replyHandler->setProperty("redirect_uri", "https://localhost:8080/"); after line 19.

      I also read this, this and this, but I just couldn't get it to work.

      Later, I had the idea to clear the "data of the hosted app" in the browser's cache (I dont know if that's the English name, as my browser runs in pt-br) , and the login page at last appeared!!

      I have to click 3 times on the Login button for the Gotcha to appear (click on the images with cars, etc), but nothing happens in the browser or in the app. I even created a premium account at Spotify, but it made no difference.

      Any help will be much appreciated!!

      Thanks!

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 25 May 2018, 11:13 last edited by raven-worx
      #2

      @canellas
      Are you sure you want to redirect to https://localhost:8080?? Note the https!
      If not then change it to http://localhost:8080
      If it's correct check that you have OpenSSL binaries available for your app.

      I have no idea if QOAuthHttpServerReplyHandler is capable of SSL, but this was what came to my mind first.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      2
      • C Offline
        C Offline
        canellas
        wrote on 25 May 2018, 13:45 last edited by
        #3

        That was exactly the problem: misconfiguration between what I registered at Spotify, and what the app was using.

        Thanks a lot!

        1 Reply Last reply
        0

        1/3

        24 May 2018, 21:57

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved