I love using this platform a lot! I'm not sure if this is the right place to ask questions but can anyone point me towards the right direction on learning how to make fetch requests to DEV.to API?
I am trying to render out my published articles onto my personal site but can't figure out how to work with the API KEY with my reactjs app.
I love using this platform a lot! I'm not sure if this is the right place to ask questions but can anyone point me towards the right direction on learning how to make fetch requests to DEV.to API?
I am trying to render out my published articles onto my personal site but can't figure out how to work with the API KEY with my reactjs app.
You can check the api docs here: developers.forem.com/api
I am currently working on this still. Here is my code for example.
but I keep getting an error message saying I am not authorized.
Your request seems fine.
I've tried it right now and got the same problem.
Maybe a problem with the api endpoint.
In a strange way making the request through curl worked for me.
Found the problem.
It's CORS.
Actually CORS is disabled for public API requests but not for restricted endpoints.
Take a look in some workarounds:
dev.to/jrsofty/cors-problem-workar...
I appreciate this! Thank you for being such great help