Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/slimy-windows-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'@clerk/backend': patch
---

Deprecate `createSMSMessage` and `SMSMessageApi` from `clerkClient`.

The `/sms_messages` Backend API endpoint will also be dropped in the future since this feature will no longer be available for new Clerk instances.

For a brief period it will still be accessible for instances that have used it in the past 7
days (13-11-2023 to 20-11-2023).

New instances will get a 403 forbidden response if they try to access it.
12 changes: 12 additions & 0 deletions packages/backend/src/api/endpoints/SMSMessageApi.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { deprecated } from '@clerk/shared/deprecated';

import type { SMSMessage } from '../resources/SMSMessage';
import { AbstractAPI } from './AbstractApi';

Expand All @@ -8,8 +10,18 @@ type SMSParams = {
message: string;
};

/**
* @deprecated This endpoint is no longer available and the function will be removed in the next major version.
*/
export class SMSMessageAPI extends AbstractAPI {
/**
* @deprecated This endpoint is no longer available and the function will be removed in the next major version.
*/
public async createSMSMessage(params: SMSParams) {
deprecated(
'SMSMessageAPI.createSMSMessage',
'This endpoint is no longer available and the function will be removed in the next major version.',
);
return this.request<SMSMessage>({
method: 'POST',
path: basePath,
Expand Down