Skip to main content

Getting Your API Key

To use the Mypixia widget, you'll need an API key for authentication. You can obtain an API key from the Mypixia Developer Portal.

Sign in to your account, navigate to the API Keys section, and generate a new key for your application. Remember to keep your API key secure and do not expose it in client-side code.

Passing Your API Key

There are three ways to pass your API key to the Mypixia widget, depending on your integration method:

1. HTML Script Integration

When loading the Mypixia widget via a JavaScript script tag, pass your API key as a prop when initializing the script:

<div id="mypixia-widget-container"></div>
<script src="https://cdn.mypixia.com/index.umd.js"></script>
<script>
Mypixia.render(document.getElementById('mypixia-widget-container'), {
canvasId: "my-canvas-id",
apiKey:'YOUR API KEY'// optional depending on features you need
apiEndpoint: 'YOU WILL RECEIVE IN EMAIL ONCE YOU GET API KEY',// required if you pass API KEY
...
});
</script>

2. NPM Package Integration

When using the Mypixia widget as an NPM package in your React application, pass the API key as a prop to the Mypixia component:

import React from 'react';
import { Mypixia } from '@mypixia/simplex-designer';

function MyComponent() {
return (
<Mypixia
canvasId="my-canvas-id"
apiKey="YOUR_API_KEY_HERE"
apiEndpoint: 'YOU WILL RECEIVE IN EMAIL ONCE YOU GET API KEY'

/>
);
}

export default MyComponent;