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)

Can I use a camera kit with electron

Can I use a camera kit with electron?

In a previous question, it was answered that the camera kit can be used with electron.

However, when I run the following, it returns a 401 error.

import { bootstrapCameraKit } from "@snap/camera-kit";

(async function main() {
const apiToken = "Your API Token value copied from the Camera Kit Portal";
const cameraKit = await bootstrapCameraKit({ apiToken });
})();

I have a Developer account.

Can I get rid of the 401 error without registering with origin at the location in the attached image?
If so, then electron is a desktop app, so it does not hold the domain.

I would like to ask if there is another cause of the 401 error.

Tagged:

Answers

  • Michael Mase
    Michael Mase Posts: 66 🔥🔥

    Hi @kota nakamura! Do you have Camera Kit enabled in the currently active version of your app?

  • Thanks for your reply!

    I will provide more information in detail and will contact you again from SUPPORT!

  • There is a place in the developer console to add a list of allowed domains, though,
    If I use the cameda kit in a web sdk, do I need to add the domain here?

    In the case of electron, it is a desktop app, so we don't own the domain.

  • stevenxu
    stevenxu Posts: 612 👻

    @kota nakamura I don't think you need to add the list then in your case.

    @Michael Mase to keep me honest though :open_mouth:

Categories