Hi I am a Python developer triying to make an api call to the "Digital Card and Account Services" and the "Visa Merchant Offers Resource Center" using the lines of code below, but I',m getting a "TypeError: encoding without a string argument"
How can I fix it?
url="https://sandbox.api.visa.com/vmorc/offers/v1/all"
encabezado = {'Accept':'application/json','Authorization':{'base64 encoded userid':base64.b64encode(bytes(os.open("/home/labop/Documents/virtualEnv/visaUno/visaAmbiente/app/key_#####-#####-########-#############.pem",os.O_RDWR|os.O_CREAT), 'utf-8'),'utf-8')}}
response = requests.get(url, headers=encabezado)
print(response.content)
Hi,
Thanks for being part of the Visa Developer Community! In order for us to further investigate the issue, can you please provide more information on the error you have received, including the response request of the error received, screenshot and the Correlation ID? Please send this information to Developer@visa.com.
Below are the steps to get the Correlation ID using a Google Chrome browser.
1>Open Chrome menu.
2>Click on More tools then Developer tools.
3>Check the box to Preserve Log for the Network Tab.
4>Then try to click on the add API link.
5>You can find the Correlation ID in the network log for add API call.
Thank you,
Diana
Hi,
Thanks for helping the Visa Developer Community every time you post questions and solutions to this forum! Can you please refer to this community forum post on how to get the key via this link - https://community.developer.visa.com/t5/Getting-Started-with-Visa/Could-not-create-SSL-TLS-Secure-Ch...
Thank you,
Diana