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, 6 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 Introduces New Lightning Web Components aka #LWC

    Blog in Salesforce customization, Salesforce Releases

    If you are in the Salesforce ecosystem you would have probably heard about the new release of Lightning Web Components from Salesforce buzzing around the…

    API, AURA, Aura Components, Base Lightning Components, Development
    Guha Dec 31, 2018
    6,299  Views

    Everything You Need to Know About the Salesforce Authenticator App

    Blog in Salesforce Security

    When you are using Salesforce, you should be extremely mindful of the security aspect. If your passwords get into the wrong hands, you will end…

    App, Authentication in Salesforce, Authentication Process, Build Additional Security, data
    Hexaview Mar 14, 2022
    3,771  Views
    3 Ways Salesforce Data Cloud is Transforming Healthcare

    3 Ways Salesforce Data Cloud is Transforming Healthcare

    Blog in Salesforce

    Healthcare is a constantly shifting industry and data can aid in making informed decisions that improve patient care. Despite this, the vast amounts of data…

    Appointment Scheduling, Better Patient Outcomes, Data Aggregation, Data automation, data connectivity
    Accelirate Jul 22, 2024
    427  Views

    Popular Salesforce Videos

    Salesforce Training for Beginners | Salesforce Tutorial for Certification

    Salesforce Training for Beginners | Salesforce Tutorial for Certification

    Video in Salesforce Certifications

    Once upon a time, storage was a big problem, but the innovations in technology have solved this. We can say that Cloud computing is one…

    Salesforce Reports, Process Automation, Salesforce Administration Demo, Salesforce Training For Beginers, Salesforce Tutorial For Certification
    Shiv Kumar Sharma Jan 18, 2018
    2,002  Views
    Salesforce CRM Services offered by Melonleaf Consulting

    Salesforce CRM Services offered by Melonleaf Consulting

    Video in Salesforce Consultant

    Melonleaf Consulting offers customized and configured Salesforce CRM Solutions and Services that can revolutionize your business. Experience the power of top-notch and highly effective Salesforce…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Consulting, Salesforce CRM
    Melonleaf Jul 13, 2023
    1,056  Views
    Integrate Salesforce and Active Directory Step by Step

    Integrate Salesforce and Active Directory Step by Step

    Video in Salesforce Integration

    The prospect of implementing Single Sign-on in your Salesforce org can seem daunting if you are unfamiliar with the process. In this live step-by-step demo…

    Salesforce Integration, Cloud Computing, Enterprise Application Development, Salesforce Org, Salesforce Integration Cloud
    Portia Apr 16, 2018
    1,932  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

    © 2025 - 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.