BYOK (your own app)
Bring Your Own Key. The seller authorizes your business's app, not marketapi's.
By default, the seller authorizes the marketapi app at the marketplace. With BYOK (Bring Your Own Key) you do the opposite: you register the credential of your app and the seller authorizes it.
1. What it is
The seller sees your business's app on the marketplace authorization screen, not marketapi's. You register your app's credential (Client ID and Client Secret) in the dashboard.
2. Why use it
- Your brand on the authorization screen.
- Calls count against your quota.
- Your app does not depend on ours.
3. Where it works
| Marketplace | Supports BYOK? |
|---|---|
| Mercado Livre | Yes. See the tutorial. |
| Magalu, TikTok Shop, Amazon and Shopee | When the marketplace joins marketapi. |
Following the marketplace's terms with your app is your responsibility.
4. The rules
-
Registering the credential does not touch existing connections: they stay on the marketapi app.
-
After registering, every new connection uses your app, unless the link session asks for
app: "platform". -
Removing the credential revokes only the connections made with it, and you get
connection.revokedfor each one. Connections on the marketapi app stay. -
A connection uses the same app for its whole life. To change apps, the seller connects again.
5. Force the marketapi app
With a credential registered, the link session uses your app (app: "auto", the default). To use the marketapi app anyway, send app: "platform". SELLER_ID is the id of a seller.
curl -X POST $BACKEND_URL/v1/sellers/$SELLER_ID/link-sessions \
-H "Authorization: Bearer mk_your_api_key" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"app":"platform"}'The fields are in Create link session.
6. Know which app a connection uses
A connection has an app field: platform (ours) or own (yours). It also comes in the connection.* webhooks. Details in Connections.
7. Move sellers to your app
- Register the credential.
- Create a link session for the seller.
- Ask them to connect again.
If the seller connects the same marketplace account, the connection keeps its id and becomes own. You get connection.updated.
8. Register only in the dashboard
Go to BYOK and pick the marketplace. There is no API route for this. When you save, you tick a statement: the app is yours (or your company's), and using it with marketapi under the marketplace's terms is your responsibility. marketapi records who ticked it and when.