Skip to content
Scalekit Docs
Talk to an EngineerDashboard

Proxy API Calls

Use Scalekit managed authentication and make direct HTTP calls to third party applications

Even though Scalekit Agent Auth offers pre-built connector tools out of the box for the supported applications, if you would like to make direct API calls to the third party applications for any custom behaviour, you can leverage proxy_api tool to directly invoke the third party application.

Based on the connected account or user identifier details, Scalekit will automatically inject the user authorization tokens so that API calls to the third application will be successful.

# Fetch recent emails
emails = actions.tools.execute(
connected_account_id=connected_account.id,
tool='gmail_proxy_api',
parameters={
'path': '/gmail/v1/users/me/messages',
'method': 'GET',
'headers': [{'Content-Type': 'application/json'}],
'params': [{'max_results': '5'}],
'body': '' #actual JSON payload
}
)
print(f'Recent emails: {emails.result}')

As part of the above execution, Scalekit will automatically inject Bearer token in the request header before making the API call to GMAIL.

How do I allowlist Scalekit’s outbound IP addresses on a downstream service?

Scalekit makes outbound tool calls and proxied API requests to third-party applications from a fixed set of IP addresses. If a downstream service restricts inbound traffic to an allowlist, add the IP address for your environment’s region so these calls succeed.

RegionOutbound IP address
United States34.94.129.140
European Union35.198.115.68

All outbound tool calls and proxied requests originate from the IP address that matches your environment’s region.