title: Upload photos to Flickr With API Flickr Python
body: <p>I tried upload photo to flickr with the API Python but I get this error:</p>
  
  <blockquote>
    <p>err code="100" msg="Invalid API Key (Key has invalid format)"</p>
  </blockquote>
  
  <p>I'm supposed Flickr authenticated because simpler ones I call functions that also require authentication as flickr.photos.getInfo,  flickr.photos.getPerms or flickr.photos.geo.setLocation and return results without problem.</p>
  
  <p>This is my code:</p>
  
  <pre><code>import flickrapi
  import csv
  import requests
  
  api_key = 'xxxxxxx'
  api_secret = 'zzzzzzzz'
  flickr = flickrapi.FlickrAPI(api_key, api_secret)
  flickr.authenticate_via_browser(perms='delete')
  
  def uploadPhoto(path_photo, title, description, tags):
      result=False;
      with open(path_photo, 'rb') as f:
          photo = {'file': f}
          try:    
              result = requests.post('https://up.flickr.com/services/upload/', data = {'photo':'photo', 'title':'title', 'description':'description', 'tags':'tags'})
              print(result.text)
          except Exception as error:
              print('Upload photo', error, '--- o --- titulo malo -&gt; ', title)        
      return result
  
  with open('/home/labsis06/djandoprojects/generales.csv') as csvfile:
      spamreader = csv.DictReader(csvfile, delimiter=';')
      #for row in spamreader:
      try:
          path_photo = '/home/labsis06/djandoprojects/Fotos_flickr/Phaeophytas4024/4024.55.165_C_sinuosa_000_01_600_778x820.jpg'
          title = 'C_sinuosa_000_01_600_778x820.jpg'
          description = 'Nombre Especie: Colpomenia sinuosa (Mertens ex Roth) Derbès y Solier . Descripción: Sartedemie'
          tags = 'OCHROPHYTA'+','+'Phaeophyceae'+','+'Scytosiphonaceae'+','+'Colpomenia'
          print("Ingresando fotos: result: "+str(uploadPhoto(path_photo, title, description, tags)))
      except Exception as error:
          print('Abiendo csv', error)
  </code></pre>
  
  <p>I have a group of pictures (approximately 3000 pictures) and I want to upload a csv file, but to prove what I'm doing with a static value.</p>
  
  <p>Any idea what is the problem?</p>
  
  <p>Appreciate your help.</p>
  
  <p>Regards</p>