Schedule a DELETE request with AssemblyAI and EasyCron
This tutorial guides you through the process of scheduling a DELETE request for a transcript created with AssemblyAI’s transcription service, utilizing EasyCron for scheduling.
Quickstart
Step-by-step guide
To get started, install the AssemblyAI Python SDK.
Finally, import the assemblyai
package and set your API token in the settings:
Store the transcript ID
Using this, we now construct the URL that we want our cron
job to call.
Using EasyCron’s API to schedule a DELETE request
First, sign up for an account with EasyCron here. Locate your EasyCron API key in your user dashboard.
Then, insert your EasyCron API key into your code.
Next, we will use the datetime module to generate a cron
expression for 24 hours from now (although you can configure the timedelta
argument to be whatever you want)
Now, we will schedule a cron
job 24 hours from now with EasyCron to send a delete request to AssemblyAI for the transcript that we just generated.
Troubleshooting:
Error 3: The cron expression you entered is invalid or it cannot be matched in a realitic future.
: Check that your EasyCron account settings has UTC configured as the default timezone.
Other resources
AssemblyAI DELETE endpoint API reference
EasyCron API reference