Shazam Core

भुगतान किया गया
द्वारा Tipsters CO | अपडेट किया गया 5일 전 | Music
लोकप्रियता

9.9 / 10

लेटेंसी

1,801ms

सेवा का स्तर

100%

Health Check

100%

सभी चर्चाओं पर वापस जाएं

422 response

Rapid account: Buenc 86
buenc86
일 년 전

Hi
I’m getting this reponse code 422.

{“detail”:[{“loc”:[“body”,“file”],“msg”:“field required”,“type”:“value_error.missing”}]}

What field is missed?

I’m seding exactly as displayed in your code snippet.

 let audioFile = new File([""], fileUri, {type: "audio/wav"});

  const data = new FormData();
  data.append('file', audioFile);

  const options = {
    method: 'POST',
    headers: {
      'X-RapidAPI-Key': 'MY_API_KEY',
      'X-RapidAPI-Host': 'shazam-core.p.rapidapi.com',
      'Content-Type': 'application/octet-stream'
    },
    body: data
  };
Rapid account: Tipsters
tipsters Commented 일 년 전

This is a problem in your code. I gave examples in other languages, check them

Rapid account: Buenc 86
buenc86 Commented 일 년 전

I tried the same request in postman and adding the sample file from your docs.
And I get the same 422 response code.

Rapid account: Tipsters
tipsters Commented 일 년 전

Hello!
I don’t understand this language.
Ex code for php and python:
https://rapidapi.com/tipsters/api/shazam-core/tutorials/shazam-api-tutorial

Regards. Tipsters.

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें