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, 3 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

    WordPress Salesforce Integration: The Only Guide You'll Need in 2026

    Blog in Salesforce integration

    It was a Tuesday afternoon when Sarah, a sales manager at a mid-size B2B software company in Austin, Texas, realized she had a serious problem.…

    Salesforce Integration, salesforce integration conusltant, Salesforce Integration Partner, Salesforce Integration Services
    Codleo Jul 24, 2026
    73  Views
    What is Salesforce?

    What is Salesforce?

    Blog in Salesforce Products, Salesforce Tools

    What is Salesforce? Salesforce is a cloud-based Customer Relationship Management (CRM) software that makes solutions available for sales, service, marketing, collaboration, analytics, and building custom…

    Cloud Computing Salesforce, Force.com Platform Apex Limits, Miscellaneous Apex Limits, Per-Transaction Apex Limits, Per-Transaction Certified Managed Package Limits
    Archit Feb 16, 2018
    16,085  Views
    User in Salesforce

    Creating And Maintaining the User in Salesforce

    Blog in Salesforce Admin

    Salesforce administrator manages users by creating and editing users’ details, resetting passwords, granting/removing permissions, configuring data access levels, and much more. A user is typically…

    Apex Warning Emails, Configuring Data Access Levels, Creating And Maintaining The User, Developer Edition, Email Address
    Anshu Dec 9, 2021
    4,938  Views

    Popular Salesforce Videos

    Tips on Lightning Combo Box, Events in Lightning App Builder, and More

    Tips on Lightning Combo Box, Events in Lightning App Builder, and More

    Video in Lightning, Salesforce Training

    Watch this video by Salesforce Developers to get the tips on Lightning Combo Box, Events in Lightning App Builder, and more. Watch and learn, do…

    Salesforce Training, Salesforce Tutorial, Salesforce Lightning, Lightning App Builder, Salesforce Developers
    Prafull Nov 9, 2021
    2,259  Views
    Mastering the VLookUp Function | Salesforce Tutorial

    Mastering the VLookUp Function | Salesforce Tutorial

    Video in Salesforce Training, Salesforce Admin

    Watch this amazing video tutorial and follow these steps to effectively use the VLookUp function for data import purposes in your Salesforce database. If you…

    Salesforce Training, Salesforce Tutorial, Salesforce Data, Salesforce Database, Salesforce Video
    SkyPlanner Jun 17, 2021
    4,116  Views
    Invoke a Salesforce function from Apex

    Invoke a Salesforce function from Apex

    Video in Salesforce Training

    Learn about the different ways in which you can invoke a Salesforce. Watch this video and learn, if you have any doubts or concerns, do…

    Salesforce Training, Salesforce Tutorial, Salesforce Apex, Apex, Salesforce Learning
    Pooja Jun 10, 2022
    1,801  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.