Shazam API free

GRATIS CON POSSIBILITÀ DI UPGRADE
Da DiyorjonAxmadjonov | Aggiornamento il y a 2 mois | Music
Popolarità

9.3 / 10

Latenza

1,136ms

Livello di servizio

100%

Health Check

100%

Torna a tutte le discussioni

Using API in PowerShell

Rapid account: Wagsat 12
wagsat12
il y a 2 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 2 mois

binary

Rapid account: Wagsat 12
wagsat12 Commented il y a 2 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 2 mois

it is possible

Rapid account: Wagsat 12
wagsat12 Commented il y a 2 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 2 mois

have you tried with another mp3?

Partecipa alla discussione - aggiungi un commento di seguito:

Accedi/Iscriviti per pubblicare nuovi commenti