How do i pass parameters and header to an url using function.

If you’re on a recent 8.0 version, you can use, params=parameters, headers=header).json

That said, using should still work, but you’ll have to encode your URL parameters manually; the postData parameter the function accepts indicates data to send in the request body, not as URL parameters, which it looks like you’re trying to do. You’ll need to manually append the parameters to the API URL you’re retrieving; something like:

import urllib

url = ""
url += "?"
postParams = # some dictionary
header = #some dictionary

for k, v in postParams.items():
	url += urllib.quote(k) + "=" + urllib.quote(v), headerValues=header)
1 Like

Yes i actually did not define the parameters for as defined.
Now its working fine.
I ll also try
Thanks for the help