January 28, 20178 yr Hi. I am trying to script the getting of some data from a website that has an API. I have BaseElementsPlugin and was given an example bit of code by the website: data = {'domain': domain, 'include_generic': True} headers = {'X-Api-Key': 'xyz123'} resp = requests.post('https://api.anymailfinder.com/v3.0/search/domain.json', data=data, headers=headers) I have never dealt with this kind of programming and am not even sure where this info would go or what script step(s) I would use to call this. Is this CURL? Are you aware of sample FM scripting that I could use as a model to figure this out? Thanks for any help with this!
January 29, 20178 yr That example does not look how you would use the BE plugin to make API calls... In FM it would look something like this; where $_json is the data that you want to send. You would have as many of the "set custom headers" as you need, their API will tell you what you need. This is assuming that the API requires an HTTP POST. If the API requires only HTTP GET then it would like different.
Create an account or sign in to comment