Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

246
Visualizações
My API client's User-Agent string does not appear to be sent correctly

Screenshot: https://i.imgur.com/qrfrnfj.jpg

Host documentation:

Rate Limiting

Requests are throttled by the server by source IP to 60 per minute for authenticated requests, and 25 per minute for unauthenticated requests, with some exceptions.

Your application should identify itself to our servers via a unique user agent string in order to achieve the maximum number of requests per minute.

I am seeing 'Too many Requests' there so I clearly need to throttle my app. But the ratelimit is 25, and when I look at the user agent I see:

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0

In my code I have...

function getRelease(idFiltered) {
  return fetch(`https://api.discogs.com/releases/${idFiltered}`, {
    'User-Agent': 'Dispodger/0.1',
  })

...but it looks like that is not being sent correctly.

I tried with Chrome as well, and I appear to be suffering with the same problem -

user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36

I read this, which reports a similar problem. Maybe I need to add...

Accept: 'application/json',
'Content-Type': 'application/json',

...but I'm not sure about that.

Any ideas how to fix this problem please? TIA.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda