How can I get my apps authenticated

I write a program that accesses to Grafana, and
get alert info in json-format.

However,this program returns the following message.
Along with tutrial on the official site,
I added authentication info that specifies api key I generated to Http-Request header,Grafana may not recognize it.

message “Unauthorized”

OS :Linux Mint 18.2
Grafana:v5.0.0(without Apache)

CODE in Python

import json, urllib2
import requests

iparams={‘Authorization’:’ Bearer '}

url = ‘http://myserver/api/alerts

# add api-key to the request header.
response = requests.get(url, params=iparams)

except Exception, e:
print e

Duplicate of How can I get my apps authenticated by Grafana Service?