SpotifyAPI.Web.APIException: Server error when calling Tracks.Get()
See original GitHub issueSteps to reproduce:
var config = SpotifyClientConfig
.CreateDefault()
.WithAuthenticator(new ClientCredentialsAuthenticator(SPOTIFY_CLIENT_ID, SPOTIFY_CLIENT_SECRET));
var api = new SpotifyClient(config);
// Try to get IPlayableItem
track = await api.Tracks.Get("7CsdHQZlVcksVMwGlvulD0"); // here throws exception
SpotifyAPI.Web.APIException: Server error.
at SpotifyAPI.Web.Http.APIConnector.ProcessErrors(IResponse response)
at SpotifyAPI.Web.Http.APIConnector.DoRequest(IRequest request)
at SpotifyAPI.Web.Http.APIConnector.DoSerializedRequest[T](IRequest request)
at SpotifyAPI.Web.Http.APIConnector.SendAPIRequest[T](Uri uri, HttpMethod method, IDictionary`2 parameters, Object body, IDictionary`2 headers)
at spotytovkshare_backend.Controllers.Spotify2Controller.GetSearchName(String uri) in M:\GitHub\spotytovkshare_backend\Controllers\SpotifyController.cs:line 175
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Implelentation: https://github.com/rhiskey/spotytovkshare_backend/blob/a0a1d07e88adbea4a2fd3b9abedba6c5e4682104/Controllers/SpotifyController.cs#L172
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Error Handling | SpotifyAPI-NET
API calls can fail when input data is malformed or the server detects issues with the request. As an example, the following request ......
Read more >API calls
The Spotify Web API is a restful API with different endpoints which return JSON metadata about music artists, albums, and tracks, directly from...
Read more >How can I get the currently playing track from spotify using ...
I am trying to use SpotifyAPI.Web for C#, in order to get the currently playing track from my Spotify-player. Here is my code...
Read more >SpotifyException: http status: 500 · Issue #353 · spotipy-dev ...
After a few songs I seem to be getting a 500 from Spotify. Below is my error: Traceback (most recent call last): File...
Read more >Spotify Integration - "500 Internal Server Error"
I can't integrate Spotiy anymore in Version 0.115.2. First, it ends in " INVALID_CLIENT: Invalid redirect URI". As written in the documentation, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

So I tried to reproduce it with
ClientCredentialsAuthenticator, but was unable to.Due to the fact that the error just says
Server Error. I would also assume something is wrong on Spotify’s end. If there would be sth wrong with the token, which we can fix, it would be some kind ofinvalid_access_tokenerror.I’m closing it for now, but feel free to contact spotify in the forums and update us here!
I will recheck within next week if it’s maybe related to the
ClientCredentialsAuthenticator, although I doubt it