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

    Why Salesforce is the Best CRM for Scaling Startups

    Blog in Salesforce

    Startups fight fiercely to expand their companies, attract customers, and break into new markets. However, managing company analytics, sales funnels, and client relationships become more…

    Salesforce, Salesforce Consulting, Salesforce CRM, Salesforce Development
    SP Nov 11, 2025
    88  Views
    Visualforce Pages

    Introduction to Visualforce Pages | Salesforce Guide

    Blog in Salesforce Apex

    What is Visualforce Page? Visualforce page is a web development language created by Salesforce. The syntax for this language is like HTML. It allows developers…

    Complex Pages, Controller Code, Controllers, Controllers in Visualforce Page, Create Custom Controllers
    Romil Singh Oct 27, 2021
    4,864  Views
    Integration of Salesforce with Google Calendar

    Integration of Salesforce with Google Calendar Using REST API

    Blog in Salesforce integration

    In this Blog, we are going to Integrate Salesforce with Google (Calendar, Email, Drive etc.) REST API. For this article, we are going to integrate…

    Apex REST API, API, API and Services, API Documentation, App Name
    Parvez Alam Nov 14, 2022
    5,141  Views

    Popular Salesforce Videos

    Add Intelligence to Any Salesforce App with Einstein Discovery

    Add Intelligence to Any Salesforce App with Einstein Discovery

    Video in Salesforce Einstein

    Bring intelligence in the context on any Force.com app thanks to the power of Einstein Data Discovery. Any Salesforce Admin or Developer can add in…

    Salesforce Developer, Salesforce Process Builder, Salesforce Applications, Salesforce Einstein, Machine Learning
    Ashley Nov 23, 2018
    1,795  Views
    Work Your Opportunities and Manage Your Pipeline (Lightning Experience) | Salesforce

    Work Your Opportunities and Manage Your Pipeline (Lightning Experience) | Salesforce

    Video in Lightning

    In this video, Salesforce Support demonstrates how to work with deals and manage your pipeline in the Salesforce Lightning Experience. With interactive features that help…

    Salesforce Training, Salesforce Tutorial, Salesforce Lightning, Salesforce Lightning Experience, salesforce
    Mayra Oct 27, 2022
    1,486  Views
    Salesforce JMS Integration Using MuleSoft | Salesforce Tutorial

    Salesforce JMS Integration Using MuleSoft | Salesforce Tutorial

    Video in Salesforce Training

    Salesforce JMS Integration. In this video, the following points will be covered - 1. Introduction Learn how to use queues to integrate data in Salesforce.…

    Salesforce Tutorial, Salesforce Video, Salesforce Learning, Mulesoft, Data
    Algoworks Jul 13, 2021
    2,304  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.