
Write a function to send an SMS message using the Twilio API. If you click on the specific link, the detailed logs are shown. We can also check the logs of whether the SMS was sent or not, what the details were, etc., in the Twilio console. You can create a NASA APOD API Key on the NASA Open APIs page by filling in the form:Ĭreate the Django project and the Python virtual environmentĬreate a new Django project from your command prompt called nasa_apod_sms_project, then navigate to this new directory:įollowing that will be the NASA Picture of the day's title, description, and a link to the photo. Your Account SID and Auth Token are found in your Twilio account dashboard as shown below: The Python installation manager, known as pip. It's free and includes 1000 requests per minute. You will need an API Key to use theNASA Astronomy Picture of the Day API.
If your operating system does not provide a Python interpreter, you can download an installer from the site.
NASA PICTURE OF THE DAY APP CODE
The complete code is available in this repository. Schedule the SMS to be sent every day at 10 am local time.
Create and send an SMS to selected phone numbers using Twilio, and.Get a response (astronomy picture of the day and its related information from the NASA APOD API,.Instead of reinventing the wheel, I used Twilio SMS, Django, Celery, and the NASA APOD API to create my application. That's when I thought of creating an application that would send me an SMS with the latest picture of the day from the NASA APOD API. I found the NASA Astronomy Picture of the Day and their API during my search. Astronomy has always been a fascinating subject and has always piqued my interest.