Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

daraja mpesa

*** Authorization Request in Python ***|
 
import requests
url = "https://sandbox.safaricom.co.ke/oauth/v1/generate"
querystring = {"grant_type":"client_credentials"}
payload = ""
headers = {
  "Authorization": "Basic SWZPREdqdkdYM0FjWkFTcTdSa1RWZ2FTSklNY001RGQ6WUp4ZVcxMTZaV0dGNFIzaA=="
}
response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
print(response.text)
Comment

PREVIOUS NEXT
Code Example
Python :: python turtle tutorial 
Python :: rgb to hex python 
Python :: merge list elements python 
Python :: iterating string in python 
Python :: login required 
Python :: python repr() 
Python :: python environment variable 
Python :: pandas how to read csv 
Python :: django password hashers 
Python :: watershed segmentation 
Python :: python string variable 
Python :: positional only arguments python 
Python :: write hexadecimal in python 
Python :: download gzip file python 
Python :: python singleton module 
Python :: python unicode point to utf8 string 
Python :: dfs 
Python :: python unbound variable 
Python :: @property python 
Python :: generating random numbers numpy 
Python :: stack.pop() 
Python :: __call__() python 
Python :: groupby as_index=false 
Python :: keras callbacks 
Python :: python3 
Python :: telegram bot carousel 
Python :: python assertEqual tuple list 
Python :: python starting multiple processes in a loop 
Python :: pandas cummax 
Python :: csv utf-8 to iso-8859-1 python 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =