https://lemmy.ml/api/v3 works for lemmy.ml, but when I try it with lemmy.world it gives bad request, any help?

You are viewing a single thread.
View all comments
7 points

Works on my end when you go for an existing request page like https://lemmy.world/api/v3/post/list

permalink
report
reply
3 points

hmm, interesting. It works when I do it in my node environment, but the moment the browser tries to make the request it fails.

permalink
report
parent
reply
5 points
*

@Yoru@lemmy.ml - it has to do with CORS (says in the error message) - You generally can’t make cross-origin requests in the browser unless it is explicitly allowed. This is purely a browser limitation, which is why it works in your node environment. But if you open the console on any random website and try to call fetch() to that API, it’s going to fail on any site other than lemmy.world.

permalink
report
parent
reply
1 point

yeah that’s what I observed after a few more trying, is there a possible workaround to this?

permalink
report
parent
reply
6 points

The error message tells you why it failed

permalink
report
parent
reply
1 point

oh, it’s because lemmy.world doesn’t allow api requests from lemmy.ml, and vice-versa. Is it possible that there’s a workaround?

permalink
report
parent
reply
1 point

Works for me on Firefox

permalink
report
parent
reply

Lemmy.World Announcements

!lemmyworld@lemmy.world

Create post

This Community is intended for posts about the Lemmy.world server by the admins.

Follow us for server news 🐘

Outages 🔥

https://status.lemmy.world

For support with issues at Lemmy.world, go to the Lemmy.world Support community.

Support e-mail

Any support requests are best sent to info@lemmy.world e-mail.

Report contact

Donations 💗

If you would like to make a donation to support the cost of running this platform, please do so at the following donation URLs.

If you can, please use / switch to Ko-Fi, it has the lowest fees for us

Join the team

Community stats

  • 129

    Monthly active users

  • 804

    Posts

  • 37K

    Comments