Announcements

Help Wizard

Step 1

NEXT STEP

Problem with requesting Tracks from Album

Solved!

Problem with requesting Tracks from Album

Plan

Premium

Country

Germany

 

 

Hello,

I'm developing now an app/website using the Spotify API with the low code platform N8N (n8n.io). I have a problem to get Tracks from an Album and I always get the following response:

 

 

 

ERROR: The service is receiving too many requests from you! Perhaps take a break?
API rate limit exceeded
 Details
Time
7/22/2021, 6:54:18 PM
HTTP-Code
429
Cause
Data below may contain sensitive information. Proceed with caution when sharing.
{
"name": "StatusCodeError",
"statusCode": 429,
"message": "429 - {"error":{"status":429,"message":"API rate limit exceeded"}}",
"error": {
"error": {
"status": 429,
"message": "API rate limit exceeded"
}
},
"options": {
"timeout": 300000,
"method": "GET",
"headers": {
"User-Agent": "n8n",
"Content-Type": "text/plain",
"Accept": " application/json",
"Authorization": "Bearer BQCeWA7MXzh2-YRaNQHzA4b6-YClwZ9-0G6c4BmntKr4igE8-5f4wiapcvhv4PzmGMQLkSIYN3CbWETDpA3MhooSfS-6SWv_jMKpBb1JYL3s51DfevjoQPx4EGFEGKIcHJIFM0S1Vk6jRzKgVk83-hMSzb2wv6UAqF7-pEUX8Lc31tD5hKSVi9kI8rMQDs21WEGHll-j9ONgdcTeJZM_Rb_USgjPQkJuHWH53g"
},
"qs": {
},
"uri": "https://api.spotify.com/v1/albums/0qujii0JVDkdhkkqycvzgX/tracks",
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
},
"response": {
"statusCode": 429,
"body": {
"error": {...} // 2 keys
},
"headers": {
"access-control-allow-origin": "*",
"access-control-allow-headers": "Accept, App-Platform, Authorization, Content-Type, Origin, Retry-After, Spotify-App-Version, X-Cloud-Trace-Context, client-token, content-access-token",
"access-control-allow-methods": "GET, POST, OPTIONS, PUT, DELETE, PATCH",
"access-control-allow-credentials": "true",
"access-control-max-age": "604800",
"retry-after": "4",
"access-control-expose-headers": "Retry-After",
"content-length": "80",
"strict-transport-security": "max-age=31536000",
"x-content-type-options": "nosniff",
"vary": "Accept-Encoding",
"date": "Thu, 22 Jul 2021 16:54:17 GMT",
"server": "envoy",
"via": "HTTP/2 edgeproxy, 1.1 google",
"alt-svc": "clear",
"connection": "close"
},
"request": {
"uri": {...}, // 12 keys
"method": "GET",
"headers": {...} // 4 keys
}
}
}
Stack
NodeApiError: The service is receiving too many requests from you! Perhaps take a break?
    at Object.spotifyApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Spotify/GenericFunctions.js:25:15)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Object.spotifyApiRequestAllItems (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Spotify/GenericFunctions.js:34:24)
    at async Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Spotify/Spotify.node.js:1158:32)
    at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:424:47

 

 

 

I know that one of my scripts was out of control and for sure hit an API limit, but that is already fixed and was 1 month ago. Also all other requests are working fine and thats why I thought that this is maybe a bug and no longer a problem of the limit.

 

My client ID: b0e97f16d6ac43f8874e3ba8379977c6

 

I hope you can help with this so that I can continue my development as soon as possible.

 

Thanks in advance & Regards

ottic

 

 

 

 

 

 

Reply

Accepted Solutions
Marked as solution

I have now found a possible reason for the problem. As mentioned before, I am using the low-code environment n8n (n8n.io). The problem arises when I have the "Return All" switch turned on in the Spotify node there.

If I set "Return 50 Tracks" instead, it works and that is enough for me to continue working.

If anyone is still interested in the problem here is a link to the N8N forum where I posted my findings.


https://community.n8n.io/t/spotify-node-possible-problem-with-get-track-from-album/7133


Thanks @ Peter_Schorn for the help.

View solution in original post

7 Replies

This is not working for 5 weeks now. Can anyone take a look, so that I can continue my development?

Based on the error, you're still getting rate limited. You need to find a way to reduce the number of requests you make. Note that there is a "retry-after" header which tells you how many seconds you have to wait until you retry the request. In this example, you have to wait 4 seconds.

Thanks a lot for reply. I know about the "retry-after" information. The problem is that I cannot read even 1 single item from the endpoint "Get an Album's Tracks". So there must be some other problem.

I really hope that there is someone out there who can help me with this subject from the Spotify staff. Or is there any E-Mail or Ticket System that I should use instead of this forum for developer problems? 

Why don't you post a link to your entire project?

The idea behind the app is to extract information about new music releases from various websites, automatically generate a Spotify playlist updates from them every week for several genres and post the generated lists on a website (+app). A preview I experimented with is available here:

https://newreleases.antibiottics.de/

Only getting Tracks from an Album is not working. The other requests to the API work fine.

It's not an IP block, I checked that already and changed the Server IP at Digital Ocean.
Marked as solution

I have now found a possible reason for the problem. As mentioned before, I am using the low-code environment n8n (n8n.io). The problem arises when I have the "Return All" switch turned on in the Spotify node there.

If I set "Return 50 Tracks" instead, it works and that is enough for me to continue working.

If anyone is still interested in the problem here is a link to the N8N forum where I posted my findings.


https://community.n8n.io/t/spotify-node-possible-problem-with-get-track-from-album/7133


Thanks @ Peter_Schorn for the help.

Suggested posts