Skip to contentSkip to navigationSkip to topbar
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
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listMarketplaceAvailableAddOn() {
11
const availableAddOns = await client.preview.marketplace.availableAddOns.list(
12
{ limit: 20 }
13
);
14
15
availableAddOns.forEach((a) => console.log(a.sid));
16
}
17
18
listMarketplaceAvailableAddOn();

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

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listAvailableAddOn() {
11
const availableAddOns = await client.marketplace.v1.availableAddOns.list({
12
limit: 20,
13
});
14
15
availableAddOns.forEach((a) => console.log(a.sid));
16
}
17
18
listAvailableAddOn();

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.