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

    AI in Salesforce

    Transform businesses with the power of Artificial Intelligence leveraged through Salesforce Einstein

    Blog in Salesforce Einstein

    Artificial Intelligence is powering next-generation customer experiences with smart predictions, intelligent recommendations, timely automation and much more. Gartner predicts that by 2020, a staggering 85% of…

    Artificial Intelligence, Artificial Intelligence in Salesforce, Cloud Computing, Commerce Cloud Einstein, Einstein Activity Capture
    DemandBlue Jul 19, 2018
    3,596  Views
    Lightning App Manager

    Lightning App Manager in Salesforce - All you Need to Know

    Blog in Others

    Lightning App In Salesforce An app is a group of components that work together to accomplish a certain task. With Lightning Experience, your users can…

    App Manager, App Manager in Salesforce, App Personalization, Custom Objects, Data Model
    Ashish Sep 7, 2022
    6,013  Views

    How Salesforce CDP Can Improve Marketing Engagements?

    Blog in Salesforce

    Consumers have transitioned to a digital-first mindset. In order to participate with authenticity, customize every moment, and develop trusted customer relationships, marketers must put data…

    API, AppExchange, Artificial Intelligence, Audience Groups, Audience Segments
    Apphienz Nov 11, 2021
    3,131  Views

    Popular Salesforce Videos

    Customize Salesforce in a Flash with Lightning

    Customize Salesforce in a Flash with Lightning

    Video in Salesforce customization

    This video shows you how to use Lightning App Builder to make page customizations without any code. This enables admins to tailor Lightning Experience for…

    Salesforce Online Training, Salesforce Lightning, Salesforce Lightning Experience, Salesforce Lightning Components, Salesforce Visualforce Page
    Pooja Jan 30, 2018
    2,040  Views
    Mocking Apex Tests: Salesforce Tutorial

    Mocking Apex Tests: Salesforce Tutorial

    Video in Salesforce Apex

    In this Video Leonardo Berardino talks about the following: Mocking Apex Tests and Apex Mock Examples Unit Tests x Integration Tests How to create unit…

    salesforce, Apex, Salesforce Tutorials, Learning, Apex Triggers
    GyanSys Apr 17, 2023
    1,405  Views
    Update Record Using Salesforce Flow | Flow Builder Series Salesforce

    Update Record Using Salesforce Flow | Flow Builder Series Salesforce

    Video in Salesforce Training

    In this video, we will learn how to use Update Records in Salesforce Flow. Here is the timestamp for your help. ----------------- Update Records in…

    Salesforce Training, Salesforce Tutorial, Salesforce Integration, salesforce, Salesforce Flow
    Prafull Oct 29, 2021
    1,463  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.