Can I use a camera kit with electron

Options

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 🔥🔥
    Options

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

  • kota nakamura
    Options

    Thanks for your reply!

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

  • kota nakamura
    Options

    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: 591 👻
    Options

    @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: