The Marketplace Preview API is deprecated. Migrate from Preview to v1 to ensure uninterrupted service.
The Marketplace v1 API replaces the Preview API and provides increased reliability for production environments. All Marketplace users and publishers should use v1.
This migration guide shows you how to migrate your calls from Preview to v1 and lists the Marketplace API resources that require migration.
To migrate from Preview to v1, update the base URL of your API calls.
For calls made using curl, update the base URL from https://preview.twilio.com/marketplace
to https://marketplace.twilio.com/v1
.
For calls made using the Twilio Helper Library, update the method from preview
to marketplace
. The specific change depends on the programming language used, as shown in the following migration example.
The following example shows how to migrate a call to the AvailableAddOns resource from Preview to v1.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listMarketplaceAvailableAddOn() {11const availableAddOns = await client.preview.marketplace.availableAddOns.list(12{ limit: 20 }13);1415availableAddOns.forEach((a) => console.log(a.sid));16}1718listMarketplaceAvailableAddOn();
To migrate to v1, update the base URL:
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listAvailableAddOn() {11const availableAddOns = await client.marketplace.v1.availableAddOns.list({12limit: 20,13});1415availableAddOns.forEach((a) => console.log(a.sid));16}1718listAvailableAddOn();
As a Marketplace Listings user, you need to change the base URL for each affected API resource as follows:
https://preview.twilio.com/marketplace/AvailableAddOns
https://marketplace.twilio.com/v1/AvailableAddOns
https://preview.twilio.com/marketplace/AvailableAddOns/{{AddOnSid}}/Extensions
https://marketplace.twilio.com/v1/AvailableAddOns/{{AddOnSid}}/Extensions
https://preview.twilio.com/marketplace/InstalledAddOns
https://marketplace.twilio.com/v1/InstalledAddOns
https://preview.twilio.com/marketplace/InstalledAddOns/{{InstalledAddOnSid}}/Extensions
https://marketplace.twilio.com/v1/InstalledAddOns/{{InstalledAddOnSid}}/Extensions