Reputation: 6350
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
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