Heads up! We're sunsetting this forum to streamline our community space.

join us on Discord for support, updates, and all things Snap AR! See you there!
Sign up for our live Camera Kit office hour on July 17 @ 9:30am (PT) / 4:30pm (GMT)

Fetch API cannot load- issue in web camera kit - Solved

rbkavin
rbkavin Posts: 2
edited July 2023 in General #1

We are trying to make the basic version of the web Camera kit setup, but it's showing a "Fetch API cannot load" error, with a few other errors. I tried to follow the exact steps for the setup but still faced the issue.

The errors that are shown are ( have hidden the group id and lens id) :

"Preflight response is not successful. Status code: 501"

"Failed to load resource:https://api-kit.snapchat.com/snapchat.cdp.cof.CircumstancesService/targetingQuer*** Preflight response is not successful. Status code: 415"

"Fetch API cannot load https://api-kit.snapchat.com/com.snap.camerakit.v3.Lenses/groups/******/lenses/**** due to access control checks."

update:
Have solved the issue looks like some random bug where the same file started to work fine after trying it recently after deleting the app and creating new apps multiple times.

Comments

  • Michael Mase
    Michael Mase Posts: 66 🔥🔥

    Hi @rbkavin! I'd be happy to help. It would be helpful if you could confirm the following:

    • You have been approved for Camera Kit Web development
    • Camera Kit is enabled for the current version of your app
    • You are using the staging API token
  • rbkavin
    rbkavin Posts: 2
    edited July 2023 #3

    Hi @Michael Mase

    We got access to it yesterday, and I'm developing it for the web using the staging API token, as I created the app today.

    So I tried to use Webpack ( that I regally use) and also vite to.

    Update:
    Have solved the issue looks like some random bug where the same file started to work fine after trying it recently.

  • stevenxu
    stevenxu Posts: 612 👻

    @rbkavin Glad this was resolved. Thanks for closing the loop with the update.

Categories