question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImplicintGrantAuth - Error 404

See original GitHub issue

In #283 I had some problems with converting the proper Auth Code by @JohnnyCrazy from C# into VB.NET. But I think I handled it now. This is my Code now:

Private Shared Sub WebConnect()
   Dim auth As SpotifyAPI.Web.Auth.ImplictGrantAuth = New SpotifyAPI.Web.Auth.ImplictGrantAuth(clientID, "http://localhost:4002", "http://localhost:4002")
   AddHandler auth.AuthReceived, AddressOf AuthOnAuthReceived

   auth.Start()
   auth.OpenBrowser()
   Console.ReadLine()
   auth.Stop(0)
End Sub

Private Shared Sub AuthOnAuthReceived(ByVal sender As Object, ByVal payload As SpotifyAPI.Web.Models.Token)
   Dim api = New SpotifyAPI.Web.SpotifyWebAPI With {
       .TokenType = payload.TokenType,
       .AccessToken = payload.AccessToken
   }
   Dim profile As SpotifyAPI.Web.Models.PrivateProfile = api.GetPrivateProfile
   Console.WriteLine(profile.DisplayName)
End Sub

Unfortunately, I still have problems with this Auth. I added “http://localhost:4002” to the Redirect URIs in the Spotify Developer Center already. After starting WebConnect(), my browser says “Connection Failed”. When I change the parameter from auth.Stop(0) to authStop() or authStop(1000), the opened site just tells me “404 - Not Found”.

Whats wrong with my code?

EDIT: The AuthOnAuthReceived-Event doesn’t get triggered. Why?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
renenienabercommented, Apr 1, 2019

Was this ever solved?

I somehow figuered out to authorize to the API. But I didn’t worked on this project for months and I am not sure if the solution is still working. As soon I am back in my city I’ll send you the code for you trying it out.

0reactions
OneBobonecommented, Apr 9, 2019

Thank you! That worked. If I may, I would appreciate continuing the discussion in a non closed forum: https://github.com/JohnnyCrazy/SpotifyAPI-NET/issues/333

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: OAuth 2.0 implicit grant flow token endpoint issue...
Solved: Hi, I am having an issue with hitting the token and authorization endpoints for OAuth 2.0 Implicit grant flow.
Read more >
Authorize end point throws error "404". As far as I ...
When I try authorize endpoint, I get a “404” error. ... You'll want to either enable Implicit grant - ID Token for the...
Read more >
404 Error From OAuth Token URL
What is the purpose of the implicit grant authorization type in OAuth 2? 1 · What's the correct flow the OneLogin Login API...
Read more >
Adding Auth0 to .NET Core gives me a 404 (Not Found)
My project won't load in the browser: Failed to load resource: the server responded with a status of 404 (Not Found). Unhandled Promise ......
Read more >
404 Error when using Azure as OIDC Provider #12535
Issue When configuring Authentication to use OIDC as the "Auth Mode" and using Azure as the Provider, ... Implicit grant: ID tokens checked...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found