Toggle Side Panel

  • Home
  • Articles
    • All Articles
    • Blogs
    • Videos
    • Infographics
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Marketplace
  • Advertise With Us
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Home
    • Articles
      • All Articles
      • Blogs
      • Videos
      • Infographics
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Marketplace
    • Advertise With Us
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › How do I get the IP of the Salesforce Instance from which the callout is to be performed?

    Tagged: Account, API Callout, Http, IP Address, Salesforce Apex, Salesforce SOQL

    • Salesforce® Discussions

      How do I get the IP of the Salesforce Instance from which the callout is to be performed?

      Posted by Anup on May 10, 2016 at 6:49 AM

      How do I get the IP of the Salesforce Instance from which the callout is to be performed? As I need to have the IP populated in a request so that the external service could validate the request?

       

      Gourav replied 9 years, 8 months ago 2 Members · 1 Reply
      • Account
      • API Callout
      • Http
      • IP Address
      • Salesforce Apex
      • Salesforce SOQL
    • 1 Reply
    • Gourav

      Member
      May 24, 2016 at 10:57 AM

      The Salesforce IP addresses can change, and you should use Salesforce IP Address to whitelist as a starting point.

      With that taken into account, you can use an existing web service to tell you what the IP address is (for that request at least).

      HttpRequest req = new HttpRequest();
      req.setEndpoint('http://icanhazip.com/');
      req.setMethod('GET');
      Http httpReq = new Http();
      HttpResponse res = httpReq.send(req);
      System.debug(res.getBody());

      Log output from na5.

      10:09:49:424 USER_DEBUG [6]|DEBUG|182.50.78.8
      Don't forget to add http://icanhazip.com as a remote site.

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    application solution

    Popular Salesforce Blogs

    Salesforce Lead Management

    Effective Salesforce Lead Management Tips And Best Practices

    Blog in Salesforce

    Companies that use Salesforce to boost their sales funnel and close more deals soon discover that they need to do more than just track sales…

    Automate Lead Distribution, Best Practices, Business Function, Contacts Tab, Conversion of Leads
    Angela Johnson Aug 3, 2021
    11,131  Views
    Data Export in Salesforce

    Data Export in Salesforce - A Brief Guide

    Blog in Data, Salesforce

    Exporting data from Salesforce can be done with the help of Data Export methods, it can be done either in a manual way or in…

    API, Attachments, automated process, Automation, CSV Files
    kishan Sep 24, 2021
    4,086  Views
    How to Create Custom Layout for Community Pages Using Salesforce Lightning Component

    How to Create Custom Layout for Community Pages Using Salesforce Lightning Component?

    Blog in Lightning

    Hey! May be you are using standard layout for community pages in salesforce but in this blog, we will learn how to create custom layout…

    Community Pages, Lightning Component, Page Layout, Salesforce Community, Salesforce Lightning Component
    Parul Sep 18, 2018
    11,762  Views

    Popular Salesforce Videos

    Salesforce Tutorial | Data Extensions in Marketing Cloud

    Salesforce Tutorial | Data Extensions in Marketing Cloud

    Video in Data, Salesforce Training

    In this video, we are going to show you something so simple, yet so powerful, you may not even know it existed. For more Salesforce…

    Salesforce Training, Salesforce Tutorial, Salesforce VIdeos, Salesforce Learning, Marketing Cloud
    Stimulus Consulting Jan 6, 2021
    2,915  Views
    How to Logging Automated Emails on Related Records

    How to Logging Automated Emails on Related Records

    Video in Salesforce Admin

    Learn how to logging automated emails on related records. We will show you how to create a process builder using the package Send Emails. This…

    Salesforce Training, Salesforce Tutorial, Process Builder, Salesforce Video, Salesforce Learning
    SkyPlanner Nov 1, 2022
    1,665  Views
    How to Become a Salesforce Developer? No Programming Experience Needed

    How to Become a Salesforce Developer? No Programming Experience Needed

    Video in Salesforce Stories, Salesforce Admin

    Salesforce Developer has once again been named one of the world's best jobs. In a list of 25 job roles, Salesforce was the only company…

    Salesforce Training, Salesforce Tutorial, Salesforce Jobs, Salesforce Developer, salesforce
    Nauman May 27, 2021
    1,589  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    Try AuditMyCRM - It is a Salesforce CRM Audit tool which comprehensively scans your Salesforce org and gives you the list of errors or warnings you need to take care of.
    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.