Skip to main content

Delete Media

deleteMedia

For deleting a media you need to use deleteMedia and provide the mediaId for the media you want to delete.

Parameters

  • mediaId: (string) - The ID of the media to delete.

Returns

  • Promise<ResponseType<string>>: A promise that resolves on successful deletion.

Example

import { deleteMedia } from 'react-native-altibbi';

deleteMedia("1234123").then((res) => {
console.log(res);
});

Responses

Status 204

Success

Status 401

UnauthorizedHttpException represents an Unauthorized HTTP exception with status code 401.

{
"name": "Unauthorized",
"message": "Your request was made with invalid credentials",
"code": "0",
"status": "401",
"type": "yii\\web\\UnauthorizedHttpException"
}

Status 404

Not Found.

{
"name": "Not Found",
"message": "Object not found: {id}",
"code": "0",
"status": "404",
"type": "yii\\web\\NotFoundHttpException"
}