Downloading photos i've taken

Hello there,

I was wondering if it’s possible to not only view the photo’s iv’e taken on my.farmbot.io, but also to download them using python? Is there a way to request where the photo is stored instead of dowloading the photo manually (right click, save image) from the farmbot.io photo storage, so i can save them somewhere else?

For example: if i want to take a picture using celeryscript and send it automatically to my own database or something like that, is there an easy way to do this?

Regards,
Niek

1 Like

Here’s an example using the API (replace my token with your encoded token):

import os
import requests
import json

API_TOKEN = 'my token'
headers = {'Authorization': 'Bearer ' + API_TOKEN,
           'content-type': "application/json"}
response = requests.get('https://my.farmbot.io/api/images', headers=headers)
images = response.json()
most_recent_image_url = images[0]['attachment_url']
print(most_recent_image_url)

In future releases, a log message will be sent over the message broker with the API data for an image when it’s taken, which may make things easier for you.

Hello, I want to ask you, have you realized the growth of the plant through the camera and uploaded the picture to the operation interface?

Hi there,
Since today i’m getting an http 403 error. When going to the storage i see the following:

AccountProblem

Your Google account is not currently enabled for this operation. Please check https://console.developers.google.com/billing to see if you have a past due balance or if the credit card (or other payment mechanism) on your account is expired. You can find additional information at https://developers.google.com/storage/docs/signup

The billing account for the requested project is disabled in state 'closed'

Thank you for the error report. Access to images should now be completely restored.