Shazam API free

फ्रीमियम
द्वारा DiyorjonAxmadjonov | अपडेट किया गया il y a 2 mois | Music
लोकप्रियता

9.4 / 10

लेटेंसी

1,425ms

सेवा का स्तर

99%

Health Check

87%

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

Using API in PowerShell

Rapid account: Wagsat 12
wagsat12
il y a 3 mois

I’m trying to use the API in PowerShell, but I don’t understand how to pass the audio file to the WebRequest. I have tried passing the filename and I have tried imbedding the raw MP3 in the body, but i always get “could not be determined”. But if I use the same MP3 file from the RapidAPI playground Test Endpoint it works.

This is my code:

headers=@headers=@{} headers.Add(“content-type”, “multipart/form-data; boundary=—011000010111000001101001”)
headers.Add("XRapidAPIKey","xxx")headers.Add("X-RapidAPI-Key", "xxx") headers.Add(“X-RapidAPI-Host”, “shazam-api-free.p.rapidapi.com”)

$response = Invoke-WebRequest -Uri ‘https://shazam-api-free.p.rapidapi.com/shazam/recognize/’ -Method POST -Headers $headers -ContentType ‘multipart/form-data; boundary=—011000010111000001101001’ -Body '-----011000010111000001101001
Content-Disposition: form-data; name=“upload_file”; filename=“1-05 Wild Honey Pie.mp3” Content-Type: audio/mpeg

-----011000010111000001101001–

Rapid account: Diyorbekkanal
diyorbekkanal Commented il y a 3 mois

binary

Rapid account: Wagsat 12
wagsat12 Commented il y a 3 mois

Unfortunately I’m not making any progress. I have tried uploading the file as a binary MP3, and I have tried encoding it as Base64. What format are you expecting the file?

Rapid account: Diyorbekkanal
diyorbekkanal Commented il y a 3 mois

it is possible

Rapid account: Wagsat 12
wagsat12 Commented il y a 3 mois

I’ve tried with multiple MP3 files. I think I am doing something wrong in the construction of the WebRequest.

Rapid account: Diyorbekkanal
diyorbekkanal Commented il y a 3 mois

have you tried with another mp3?

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

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