401 on download with api token

102 views
Skip to first unread message

Атру Горн

unread,
Nov 5, 2022, 6:10:26 AM11/5/22
to Freesound API
Hello. I'm having troubles with downloading a sound using my API token with axious.
For searching I use `https://freesound.org/apiv2/search/text/?query=${query}&token=${process.env.FREESOUND_API_TOKEN}` and it's working perfectly

When I try to download same way, I get 401 error. I'm using axios and nodejs, so I have been trying to put my API token in "Authorization" field but it always ends the same 401 error way.

Please, tell me, what is the problem here?

Атру Горн

unread,
Nov 5, 2022, 10:25:17 AM11/5/22
to Freesound API
Trying sample curl command ends with 401 error too

суббота, 5 ноября 2022 г. в 13:10:26 UTC+3, Атру Горн:

Fandroide

unread,
Dec 9, 2022, 4:09:53 AM12/9/22
to Freesound API
Hi! Did you problem get solved? Can you give some code examples, please? Thanks!

Frederic Font Corbera

unread,
Dec 9, 2022, 4:38:54 AM12/9/22
to freeso...@googlegroups.com
Hi,

To download you need to authenticate via Oauth2. Please check API documentation for more details on that authentication method.

Cheers,

frederic


--

---
You received this message because you are subscribed to the Google Groups "Freesound API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to freesound-ap...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/freesound-api/7502b6eb-e15c-4e96-ac4e-dde2669fdf38n%40googlegroups.com.
--

--
Frederic Font - ffont.github.io
Music Technology Group, UPF - mtg.upf.edu
Freesound - freesound.org

Reply all
Reply to author
Forward
0 new messages