Informatic0re
Informatic0re

Reputation: 6350

Force Google Script to use same IP for request from UrlFetchApp fetch

I am playing with Google Script UrlFetchApp fetch and figured out, that the requests it makes are done from different IP addresses. If you call UrlFetchApp.fetch() multiple times, every request is made from another IP.

I am using DigestAuth and a SessionId to make my requests and I am getting 403 Forbidden because the call to get the SessionId (which is IP-based) is from a different IP.

f.e. Call to get the SessionId was from 107.178.192.52 and the call which uses the IP-based SessionId was from 107.178.192.56

Can I force UrlFetchApp.fetch() to make the requests from the same IP?

Upvotes: 0

Views: 1133

Answers (1)

Philippe Oger
Philippe Oger

Reputation: 1097

No, it's not possible unfortunately.

The ranges of IPS used by google apps scripts however are available: https://developers.google.com/apps-script/guides/jdbc

Check the section "Setup for other databases" on that page.

Upvotes: 2

Related Questions