Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Marketplace API Preview to v1 Migration Guide


(warning)

Migrate from Preview to v1

Marketplace Preview API will be discontinued in December 2024. Please complete all migrations to v1 before this date to ensure uninterrupted service.

A non-Preview version of the Marketplace API is now available. This new version, called "v1", provides increased reliability and is suitable for production environment use. You should upgrade your Marketplace applications to use v1 as soon as possible to take advantage of these improvements and upcoming feature releases.

This migration guide explains which API resources are affected and how to migrate Preview calls to v1.


Affected API resources

affected-api-resources page anchor

The list below details which API resources must be migrated. Select the name of the resource to view its v1 API reference documentation.

  • Available Add-ons Resource
    • Preview: https://preview.twilio.com/marketplace/AvailableAddOns
    • v1: https://marketplace.twilio.com/v1/AvailableAddOns
  • Available Add-ons Extensions Subresource
    • Preview: https://preview.twilio.com/marketplace/AvailableAddOns/{{AddOnSid}}/Extensions
    • v1: https://marketplace.twilio.com/v1/AvailableAddOns/{{AddOnSid}}/Extensions
  • Installed Add-ons Resource
    • Preview: https://preview.twilio.com/marketplace/InstalledAddOns
    • v1: https://marketplace.twilio.com/v1/InstalledAddOns
  • Installed Add-ons Extensions Subresource
    • Preview: https://preview.twilio.com/marketplace/InstalledAddOns/{{InstalledAddOnSid}}/Extensions
    • v1: https://marketplace.twilio.com/v1/InstalledAddOns/{{InstalledAddOnSid}}/Extensions
  • Listing Resource (formerly known as Module Resource)
    • Preview: https://preview.twilio.com/marketplace/Module/{{ModuleSid}}
    • v1: https://marketplace.twilio.com/v1/Listing/{{ListingSid}}
  • Installed Add-ons Usage Subresource
    • Preview: https://preview.twilio.com/marketplace/InstalledAddOns/{{InstalledAddOnSid}}/Usage
    • v1: https://marketplace.twilio.com/v1/InstalledAddOns/{{InstalledAddOnSid}}/Usage

The migration from Preview to v1 requires updating the base of API calls.

For calls made using curl, the base URL must be updated from https://preview.twilio.com/marketplace to https://marketplace.twilio.com/v1.

For calls made using the Twilio Helper Library, the method must be updated from preview to marketplace. The specific change needed varies by language used and is shown in the code sample below.

The only exception is the Listing resource (formerly known as Module resource). In this case, the resource Module has been renamed to Listing. To migrate these calls, both the API base and resource name must be updated. Refer to the Listing Resource documentation for more information and v1 examples.

Code sample

code-sample page anchor
Node.js
Python
C#
Java
PHP
Ruby
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function listMarketplaceAvailableAddOn() {
_18
const availableAddOns = await client.preview.marketplace.availableAddOns.list(
_18
{ limit: 20 }
_18
);
_18
_18
availableAddOns.forEach((a) => console.log(a.sid));
_18
}
_18
_18
listMarketplaceAvailableAddOn();

To migrate to v1, update the sample shown above to the sample shown below:

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function listAvailableAddOn() {
_18
const availableAddOns = await client.marketplace.v1.availableAddOns.list({
_18
limit: 20,
_18
});
_18
_18
availableAddOns.forEach((a) => console.log(a.sid));
_18
}
_18
_18
listAvailableAddOn();


Rate this page: