Skip to content

Commit aed2e55

Browse files
authored
Merge pull request #72 from Som-Energia/API_lleida_changes
Lleida.net vol l'api key a les capçaleres
2 parents 50c0542 + dc16c8f commit aed2e55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

powersms/powersms_provider_lleidanet.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ def send_sms_lleida(
3232
values = account_obj.read(cursor, uid, account_id, ["api_uname", "api_pass"])
3333
c = Client(user=str(values["api_uname"]), password=str(values["api_pass"]))
3434
headers = {
35-
"content-type": "application/x-www-form-urlencoded",
35+
"content-type": "application/json",
3636
"accept": "application/json",
37+
"Authorization": "x-api-key {}".format(str(values["api_pass"])),
3738
}
3839
json_body = self._get_json_body(numbers_to, body, from_name, context)
3940
response = c.API.post(resource="", json=json_body, headers=headers)

0 commit comments

Comments
 (0)