Toggle Side Panel

  • Blogs
  • 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
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Blogs
    • 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
    • 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 10 years, 4 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

    Popular Salesforce Blogs

    Salesforce Company USA

    Choose An Experienced Company For Salesforce Development In The USA

    Blog in Salesforce Consultant

    When you wish to achieve unparalleled customer service, it is essential to choose an experienced and professional Salesforce Development company. The reason to select an…

    Saleforce Consulting Services in USA, Saleforce CRM, Saleforce Development Company, Salesforce Developer, Salesforce Development Services in USA
    Advanz101 Marketing Nov 6, 2018
    3,150  Views

    What are Salesforce Dynamic Actions: Overview, Benefits, Business Cases

    Blog in Salesforce

    The main idea of Dynamic Actions in Salesforce is to provide users with access to those actions which they really need according to their position…

    Automotive, Business Cases, Configuring, Consulting Partner, Criteria
    Sparkybit Apr 14, 2023
    1,511  Views

    Tips to Choose Reliable Salesforce Consulting Partners in 2019

    Blog in Salesforce Consultant

    Salesforce now helps enterprises to streamline various facets of a business ranging from sales to product delivery and customer support. Salesforce is so popular for…

    Customer Engagement, Salesforce Consultants, Salesforce Consulting Companies, Salesforce Customization, Salesforce Implementation
    Sujain Sep 18, 2019
    2,504  Views

    Popular Salesforce Videos

    How to Create Your First Salesforce Lightning Component?

    How to Create Your First Salesforce Lightning Component?

    Video in Lightning

    OpFocus walks through the steps you need to know to create your first Salesforce Lightning Component.

    Salesforce Lightning, Salesforce Lightning Experience, Salesforce Lightning Components, Salesforce Lightning Design System, How To Learn Salesforce Lightning
    Shiv Kumar Sharma Jan 31, 2018
    2,575  Views
    How To Use Data Loader In Salesforce - Learn Salesforce Series By Algoworks

    How To Use Data Loader In Salesforce - Learn Salesforce Series By Algoworks

    Video in Salesforce Products, Salesforce Training

    Learn how to use Data Loader in Salesforce. In this video, the following points will be covered - 1. Introduction Here you will get a…

    salesforce, Testing, support, Data Loader, Salesforce Series
    Algoworks Aug 31, 2020
    1,700  Views
    How to Reference Custom Metadata Types to Optimize Salesforce Account Records Using Salesforce Flow

    How to Reference Custom Metadata Types to Optimize Salesforce Account Records Using Salesforce Flow

    Video in Salesforce Development

    Watch this video to learn how to reference custom metadata types to optimize Salesforce Account Records Using Salesforce Flow Salesforce Account Region Allocation using custom…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Flow, Salesforce Video
    Prafull Jun 8, 2021
    1,821  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®.

    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.