Retrieve a Contact (Email and password) using Python

want to get a Contact’s Username and password.I am following this URL : xml-rpc - Keap Developer Portal to get details of a contact .

Sample Code:

from infusionsoft.library import Infusionsoft
from infusionsoft.library import InfusionsoftOAuth

infusionsoft = InfusionsoftOAuth(access_token)
args = {"contactId" : "34", "selectedFields":["email","password"]
print(len(infusionsoft.ContactService('load', args)))
print(infusionsoft.ContactService('load', args))

(‘ERROR’, <Fault 0: ‘No method matching arguments: java.lang.String, java.util.HashMap’>)

Please advise how to get that.

Hey @Pallav_Kumar Python is not my area of expertise. It looks like the dictionary is being passed in as an argument. Please try the following

args = {"contactId" : "34", "selectedFields":['email','password']}
contactId = args['contactId']
selectedFields = args['selectedFields']

print(infusionsoft.ContactService("load", contactId, selectedFields))

I will continue to investigate the sdk and post back here if I find something out of place.

Capitalization of field names?