Functions API

API Make Request

App Builder & Automation Expert

Stay Updated with ProcFu!

Subscribe to our newsletter for the latest tips, updates, and automation insights.

Subscribe Now

Script

api_request_send.pf

Make API requests to an OAuth2 service that has been previously integrated into your ProcFu account. This script captures and returns the response from the API. To use this feature, an API service must first be added to ProcFu through the account page.

Arguments

  • api_service: A string indicating the name of the API service as specified by the user when it was added to their ProcFu integrations.
  • user_id: A string representing the username. This username should be set up using the API Get Login Link script. To get a list of users who have already authenticated with an API service, you can use the API Users List script.
  • request_url: The URL string of the endpoint to which the API call will be made.
  • method: The HTTP method to be used for the request (e.g., GET, POST).
  • headers: Optional. A string of headers to be sent with the request. If multiple headers are needed, they should be comma-separated. If this argument is left blank, it defaults to Content-Type: application/json, Accept: application/json.
  • body: Optional. A text string representing the JSON body for the request, if needed.

Returns

The script returns the response from the API call. If the request is unsuccessful, it returns false.

Troubleshooting Known Errors

  • ERROR: invalid user: The user specified does not exist.Make sure to add a user first. You can do this using the API Get Login Link script.
  • ERROR: invalid_grant: The user exists, but there seems to be a problem with their authorization, possibly because it has expired. Try re-adding the user. Use the same API Get Login Link script to refresh their login and permissions. This often fixes the authorization issue.

Love using ProcFu Guide?

Share your testimonial and let us know how ProcFu has helped you.

Share Your Testimonial

Built with ❤️ by Thaha for the Community