Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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!

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.

 

 

2017-01-29_07-16-12.png

This is assuming that the API requires an HTTP POST.  If the API requires only HTTP GET then it would like different.

  • Author

Thank you, Wim! That is working for me.

Michael

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.