-
-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
async def bulk_search(phoneNumbers, countryCode, installationId):
"""
Perform bulk search for a list of phone numbers using Truecaller API.
Args:
phoneNumbers (list[str]): The list of phone numbers to search.
countryCode (str): The country code of the phone numbers.
installationId (str): The installation ID for authorization.
The function expects "phoneNumbers" as a list of numbers
but within the contents of the function, converts it into a string and send to the API
params = {
"q": str(phoneNumbers),
"countryCode": countryCode,
"type": 14,
"placement": "SEARCHRESULTS,HISTORY,DETAILS",
"encoding": "json"
}
While this works in getting a response from truecaller, the response have the wrong content in the "key" section
{'status_code': 200,
'data': {
'data': [
{'key': "['1234567890'",
....
}
]
}
}
We should either convert the list of numbers into a comma separated string again or just ask for a comma separated string of numbers.
Metadata
Metadata
Assignees
Labels
No labels