<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kalhara JA on Medium]]></title>
        <description><![CDATA[Stories by Kalhara JA on Medium]]></description>
        <link>https://medium.com/@kalhara.ja?source=rss-47686447e446------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*d9uNSJC7T2QUp26F-Fd9zA.jpeg</url>
            <title>Stories by Kalhara JA on Medium</title>
            <link>https://medium.com/@kalhara.ja?source=rss-47686447e446------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 00:14:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kalhara.ja/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Office Receptionist That Runs the Internet: Proxies Explained Simply]]></title>
            <link>https://medium.com/@kalhara.ja/the-office-receptionist-that-runs-the-internet-proxies-explained-simply-e9a3f8984e0e?source=rss-47686447e446------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9a3f8984e0e</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[proxy]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Kalhara JA]]></dc:creator>
            <pubDate>Wed, 29 Apr 2026 16:32:24 GMT</pubDate>
            <atom:updated>2026-04-29T16:34:16.888Z</atom:updated>
            <content:encoded><![CDATA[<p><em>You’ve heard the word “proxy” a hundred times. Here’s what it actually means and why it matters more than you think.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*trdp8QpitNHyHqtyWQqu8Q.jpeg" /><figcaption>Proxy Explained Simply</figcaption></figure><p>There’s a moment every developer hits: you’re on a corporate network, you run your app, and it just… hangs. No error. No timeout. Just silence. You Google the problem. Someone says “check your proxy settings.” You nod, pretend you understand, and open a new tab.</p><p>This post is for that moment. Let’s fix that gap once and for all.</p><h3>Start With a Building</h3><p>Picture a large office with 500 employees. If every single person walked out the front door to run their own errands, you’d have chaos. Security doesn’t know who’s coming and going. You can’t control what people bring back. The front entrance is a nightmare.</p><p>So the building hires a receptionist. You hand your request to them, they go outside and handle it, and they bring the result back to you. You never leave the building.</p><p><strong>That receptionist is a proxy.</strong></p><p>Instead of your computer talking directly to the internet:</p><pre>Your computer ───────────► google.com</pre><p>You get:</p><pre>Your computer  ──►   Proxy   ──►  google.com<br>               ◄──           ◄──</pre><p>Your computer only ever talks to the proxy. The proxy handles the internet on your behalf.</p><h3>Why Would Anyone Want This?</h3><p>There are actually four solid reasons, and they apply at very different scales.</p><p><strong>Security and control.</strong> A company can say “nobody on our network can access social media during work hours.” The proxy checks every single request. If it’s headed to instagram.com, it gets blocked. Employees can’t sneak around this because they physically cannot reach the internet without going through the proxy first.</p><p><strong>Caching.</strong> Imagine 500 employees all downloading the same Windows update simultaneously. That’s 500 copies of a 2 GB file hammering your internet connection. A proxy can download it once, store a copy locally, and serve it to all 500 people from that cache. Faster for everyone, and far cheaper on bandwidth. This is exactly what Squid (a popular proxy server) does, and why universities and large companies swear by it.</p><p><strong>Privacy.</strong> When you go through a proxy, websites see the proxy’s IP address, not yours. This is the core idea behind VPNs too, just packaged differently.</p><p><strong>Escaping private networks.</strong> Some servers have no direct internet connection at all. They live inside a private internal network, and the only way out is through a designated proxy. Banks, hospitals, and government systems work like this. If your app is deployed in one of these environments, no proxy awareness means no internet.</p><h3>Forward Proxy vs. Reverse Proxy</h3><p>This is where people get confused, because the names sound interchangeable. They are not. They do opposite things.</p><p><strong>A forward proxy protects the client.</strong> It sits in front of your users and handles requests going outward.</p><pre>[Employees] ──► [Forward Proxy] ──► [Internet]</pre><p>The internet never knows who the real user is. Think of it as a receptionist handling your outgoing calls.</p><p><strong>A reverse proxy protects the server.</strong> It sits in front of your servers and handles requests coming inward.</p><pre>[Internet] ──► [Reverse Proxy] ──► [Your Web Server]</pre><p>Users never know which server actually handled their request. Think of it as a call centre routing incoming calls to the right department.</p><p>If you’ve used Nginx, Traefik, or Cloudflare in front of a web app, you’ve used a reverse proxy. If you’ve worked inside a corporate network that blocks certain websites, you’ve been on the client side of a forward proxy.</p><h3>How Does an App Actually Use a Proxy?</h3><h3>The Easy Way: Environment Variables</h3><p>Most tools, including curl, wget, Python’s requests library, and Go’s standard HTTP client, check for these environment variables automatically:</p><pre>HTTP_PROXY=http://proxy.example.com:3128<br>HTTPS_PROXY=http://proxy.example.com:3128<br>NO_PROXY=localhost,127.0.0.1</pre><p>Set them, and the app routes all traffic through the proxy without a single line of code changes. You can verify it immediately:</p><pre>export HTTP_PROXY=http://proxy.example.com:3128<br>curl https://google.com   # goes through proxy</pre><p>Done. Clean. Simple.</p><h3>The Hard Way: Some Apps Just Ignore It</h3><p>Here is where things get painful.</p><p>Not every app respects these environment variables. Node.js 18+ ships with a built-in fetch function (powered by a library called undici under the hood). It was written for raw performance and deliberately does <strong>not</strong> read HTTP_PROXY. You can set the variable, restart your app, and Node.js fetch will still try to go straight to the internet and fail silently in a restricted network.</p><p>The same goes for any app that implements its own HTTP client from scratch. The environment variable convention is just a convention, not a requirement.</p><p>So what do you do when the app won’t listen?</p><h3>The Nuclear Option: Transparent Proxy</h3><p>If you can’t make the app proxy-aware, you force the proxy at the operating system level. The app never gets a say. This is called a <strong>transparent proxy</strong>, because the app doesn’t even know it’s being intercepted.</p><p>Here is how the traffic flows:</p><pre>App (e.g. Node.js fetch)<br>   │  thinks it&#39;s going directly to google.com<br>   │<br>   ▼<br>[iptables on the OS]   ← intercepts the traffic<br>   │<br>   ▼<br>[redsocks :12345]      ← receives it transparently<br>   │<br>   ▼<br>[Company Proxy :3128]  ← forwards to the real proxy<br>   │<br>   ▼<br>google.com</pre><p>Two tools make this work together.</p><p><strong>iptables</strong> is the Linux firewall. You configure it to intercept all outbound traffic on port 80 and 443 before it can leave the machine:</p><pre>iptables -t nat -A OUTPUT -p tcp --dport 80  -j REDIRECT --to-ports 12345<br>iptables -t nat -A OUTPUT -p tcp --dport 443 -j REDIRECT --to-ports 12345</pre><p><strong>redsocks</strong> is a small daemon that listens on that local port and forwards everything to your real proxy:</p><pre>base {<br>    daemon = on;<br>    redirector = iptables;<br>}</pre><pre>redsocks {<br>    local_ip = 0.0.0.0;<br>    local_port = 12345;<br>    ip = proxy.example.com;<br>    port = 3128;<br>    type = http-connect;<br>}</pre><p>One important detail: local_ip = 0.0.0.0 matters if you&#39;re running Docker. Docker containers live on their own internal bridge network, and their traffic arrives on that bridge interface, not on loopback. If redsocks only listens on 127.0.0.1, your containers can&#39;t reach it. Set it to 0.0.0.0 and everything works.</p><h3>Putting It All Together: A Real Scenario</h3><p>You have a server in a private data centre. No direct internet access. All outbound traffic must go through proxy.company.com:3128. You&#39;re running a Node.js app that calls a third-party API.</p><p><strong>Without any setup:</strong></p><pre>Node.js app ──► api.thirdparty.com   (connection timeout)</pre><p><strong>After setting env vars:</strong></p><pre>export HTTPS_PROXY=http://proxy.company.com:3128<br>curl https://api.thirdparty.com   # works, curl respects env vars<br>node app.js                        # still fails, undici ignores env vars</pre><p><strong>After adding the transparent proxy:</strong></p><pre>sudo iptables -t nat -A OUTPUT -p tcp --dport 443 -j REDIRECT --to-ports 12345<br>node app.js   # works, OS intercepts the traffic before it can fail</pre><p>No code changes. No patching the library. The operating system just handles it.</p><h3>The Quick Reference</h3><p>Concept What it does Forward proxy Middleman for outbound requests from your network Reverse proxy Middleman for inbound requests to your servers HTTP_PROXY env var Tells apps to use a proxy, only works if the app supports it Transparent proxy OS-level interception, works for every app regardless redsocks Receives intercepted traffic and forwards it to the real proxy iptables Linux firewall, used to redirect traffic to redsocks Squid Popular proxy server software used in companies and universities CONNECT tunnelling How HTTP proxies handle HTTPS without reading the encrypted content</p><h3>The Takeaway</h3><p>A proxy is just a middleman. Forward proxies protect clients going out; reverse proxies protect servers coming in. Most tools respect the standard environment variables, but some (looking at you, Node.js fetch) don’t. When that happens, stop fighting the app and fix it at the OS level instead.</p><p>The receptionist analogy holds all the way down. Sometimes you change how you write your requests. Sometimes you just station security at the only door and let them handle everything.</p><p><em>Found this useful? Share it with the developer on your team who keeps asking why their curl works but their app doesn’t.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9a3f8984e0e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ownership Over Tasks: A Mindset Shift in the Software Industry]]></title>
            <link>https://medium.com/@kalhara.ja/ownership-over-tasks-a-mindset-shift-in-the-software-industry-b9a4d45c4c7c?source=rss-47686447e446------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9a4d45c4c7c</guid>
            <dc:creator><![CDATA[Kalhara JA]]></dc:creator>
            <pubDate>Mon, 09 Mar 2026 22:03:39 GMT</pubDate>
            <atom:updated>2026-03-09T22:03:39.625Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="ownership-over-tasks-software-industry" src="https://cdn-images-1.medium.com/max/1024/1*znAXjM0zLulDzI_5NfSTwA.png" /></figure><p>Throughout my journey in the software industry, starting from university projects and moving into company work and freelance projects, I have noticed one key factor that consistently separates average outcomes from great ones: ownership.</p><h3>University Projects: Shared Work, Unshared Responsibility</h3><p>In many university projects, tasks are divided among team members, but responsibility for the final result is often unclear. People usually focus only on what was assigned to them. If something is missing, broken, or poorly implemented, it is easy to say, “That was not my part.”</p><p>Research, refinement, and attention to detail are sometimes ignored because they are not explicitly required. The project may be submitted on time, but it rarely feels complete or well-polished. While this approach might work academically, it creates habits that do not translate well into real-world software development.</p><h3>Company Culture: Where Ownership Defines Teams</h3><p>When entering professional software teams, the importance of ownership becomes much clearer. In strong company cultures, engineers are encouraged to think beyond assigned tasks. They understand how their work impacts the entire system, the team, and the end user.</p><p>Teams that value ownership do not rely on constant supervision. People identify problems, communicate openly, and take responsibility for solutions. Friendly collaboration also plays a major role. Respectful discussions, helping teammates, and caring about shared success lead to better software and healthier work environments.</p><p>On the other hand, in environments where ownership is weak, work often becomes fragmented. Issues are passed around, accountability is unclear, and progress slows down. Over time, this affects both product quality and team morale.</p><h3>Freelance Culture: Results Over Roles</h3><p>Freelance work highlights ownership in its purest form. Clients are not concerned about task boundaries or internal roles. They care about one thing: results.</p><p>In freelance culture, successful developers are those who take full end-to-end responsibility. They research independently, clarify requirements, solve unexpected problems, and continue working until the job is truly done. There is no room for excuses or partial completion.</p><p>This mindset builds trust. When clients know they do not need to worry or micromanage, long-term relationships are formed naturally.</p><h3>Caring About the Details That Are Never Asked For</h3><p>An important part of ownership in software work is paying attention to small edge cases and details that are often not explicitly mentioned. Leaders and clients usually focus on the bigger picture. They may not point out every minor scenario, validation issue, or unusual user behavior.</p><p>Engineers with a strong ownership mindset naturally think about these edge cases. They ask what could fail, what could confuse users, and what might break under unexpected conditions. Instead of waiting for instructions, they improve these areas on their own. These small improvements prevent future issues and quietly raise the overall quality of the system.</p><p>Often, this is the difference between software that simply works and software that feels reliable and well-crafted.</p><h3>The Value of an Ownership Mindset</h3><p>Across universities, companies, and freelance work, the lesson remains the same. Technical skills are important, but mindset is equally critical. Being self-driven, proactive, and accountable reduces risk for teams and clients alike.</p><p>Ownership does not mean working alone or doing everything by yourself. It means caring deeply about the outcome, communicating clearly, supporting others, and taking responsibility from start to finish.</p><p>From my experience, shifting from a task-based mindset to an ownership-based mindset is one of the most valuable changes a software professional can make. It leads to better products, stronger teams, and more meaningful work.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9a4d45c4c7c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enhance Your CRM Integrations with Ballerina’s HubSpot Owners Connector]]></title>
            <link>https://medium.com/@kalhara.ja/enhance-your-crm-integrations-with-ballerinas-hubspot-owners-connector-607251d9e342?source=rss-47686447e446------2</link>
            <guid isPermaLink="false">https://medium.com/p/607251d9e342</guid>
            <category><![CDATA[hubspot-crm-ballerina]]></category>
            <category><![CDATA[hubspot-crm-owners]]></category>
            <category><![CDATA[ballerina]]></category>
            <category><![CDATA[hubspot-crm]]></category>
            <category><![CDATA[hubspot-ballerina]]></category>
            <dc:creator><![CDATA[Kalhara JA]]></dc:creator>
            <pubDate>Mon, 24 Feb 2025 09:10:14 GMT</pubDate>
            <atom:updated>2025-02-24T09:40:53.587Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Ballerina HubSpot CRM Owners API Connector" src="https://cdn-images-1.medium.com/max/1024/1*228j4ihNsmlsIxTD2ZuLFg.jpeg" /></figure><p><strong>Customer Relationship Management (CRM)</strong> systems are at the heart of every business that cares about nurturing customer relationships. <a href="https://developers.hubspot.com/">HubSpot</a> is a popular CRM platform that offers a wide range of functionalities, including powerful APIs for developers to integrate their applications. In this article, we will walk you through how to integrate HubSpot CRM Owners data into your Ballerina application using the <a href="https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.owners">HubSpot CRM Owners connector</a>.</p><h3>Table of Contents</h3><ol><li>Overview</li><li>Prerequisites</li><li>Setting Up a HubSpot Developer Account</li><li>Creating a HubSpot App</li><li>Obtaining OAuth2 Tokens</li><li>Quickstart</li><li>Examples</li><li>Conclusion</li></ol><h3>Overview</h3><p><a href="https://developers.hubspot.com/">HubSpot</a> is a CRM platform that provides comprehensive inbound marketing, sales, and customer service capabilities. HubSpot’s extensive suite of RESTful APIs allows developers to programmatically interact with its CRM data.</p><p>The <strong>Ballerina HubSpot CRM Owners Connector</strong> (ballerinax/hubspot.crm.owners) lets you connect to the <a href="https://developers.hubspot.com/docs/api/crm/owners">HubSpot CRM Owners API</a>. This connector includes simplified functions to list owners, retrieve details, and more—paving the way for a streamlined development experience.</p><h3>Prerequisites</h3><p>Before you begin:</p><ol><li><strong>Ballerina Language</strong>: Install <a href="https://ballerina.io/">Ballerina</a>.</li><li><strong>HubSpot Developer Account</strong>: Ensure you have or <a href="https://developers.hubspot.com/get-started">create</a> a HubSpot Developer Account.</li><li><strong>HubSpot App</strong>: You’ll need to create a HubSpot App to obtain your Client ID and Client Secret.</li><li><strong>cURL (Optional)</strong>: For generating OAuth tokens via the command line.</li></ol><h3>Setting Up a HubSpot Developer Account</h3><h4>Create or Login to a Developer Account</h4><ol><li>Navigate to the <a href="https://developers.hubspot.com/">HubSpot Developer Portal</a>.</li><li>If you already have an account, log in directly. Otherwise, sign up for a free developer account.</li></ol><h4>Create a Developer Test Account (Optional)</h4><p>Developer Test Accounts are isolated from your production data and are ideal for testing integrations.</p><ol><li>In your HubSpot developer dashboard, go to <strong>Test accounts</strong> from the left sidebar.</li></ol><figure><img alt="Test accounts section" src="https://cdn-images-1.medium.com/max/1024/1*rYCvWhedbQpuFC8kBfF_aw.png" /></figure><ol><li>Click <strong>Create developer test account</strong>.</li></ol><figure><img alt="Create developer test account" src="https://cdn-images-1.medium.com/max/1024/1*ExKdzrSLmm2HjZeyf578nA.png" /></figure><ol><li>Provide a name and click <strong>Create</strong>.</li></ol><figure><img alt="Create test account" src="https://cdn-images-1.medium.com/max/1024/1*xAYR71l4pS4CpH4cnsDzWw.png" /></figure><p>You’ll see your newly created test account in the list. Feel free to skip this step if you already have a dedicated test or production account.</p><figure><img alt="Test account portal" src="https://cdn-images-1.medium.com/max/1024/1*3RucQifT3rvEjKANT_D-AA.png" /></figure><h3>Creating a HubSpot App</h3><p>Once you have a developer account (and optionally, a test account), the next step is to create a HubSpot App.</p><ol><li>In your developer portal, go to <strong>Apps</strong> from the left sidebar.</li><li>Click on <strong>Create app</strong> on the top right corner.</li></ol><figure><img alt="Create App" src="https://cdn-images-1.medium.com/max/1024/1*Ckz0drzT772L3-72ZPp8YA.png" /></figure><p>3. Give your app a <strong>Name</strong> and a <strong>Description</strong>.</p><figure><img alt="App name and description" src="https://cdn-images-1.medium.com/max/1024/1*cufw2vyh5EsVhGGygXjFFg.png" /></figure><h4>Configure Authentication</h4><ol><li>Switch to the <strong>Auth</strong> tab of the newly created app.</li></ol><figure><img alt="Config auth" src="https://cdn-images-1.medium.com/max/1024/1*ONByv_SJOqCIOgf8f9kHqQ.png" /></figure><p>3. Add <strong>Scopes</strong> to your application. For this connector, at minimum you need:</p><ul><li>crm.objects.owners.read</li></ul><p>Click <strong>Add new scopes</strong> and add crm.objects.owners.read. These scopes define which parts of the HubSpot data your app can access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*waWNK8BV_1x463qEqxwPtw.png" /></figure><p>4. In the <strong>Redirect URL</strong> section, add the URL where HubSpot should redirect the user after the OAuth flow. For testing, you might use <a href="http://localhost./">http://localhost.</a></p><figure><img alt="Redirect url" src="https://cdn-images-1.medium.com/max/1024/1*6BgIvLgPwOuFXBl3CF6bGw.png" /></figure><blockquote><strong><em>Important</em></strong><em>: This </em><strong><em>Redirect URL</em></strong><em> must match exactly what you will use in the OAuth process later.</em></blockquote><p>5. After you have added the scope and redirect URL, click <strong>Create App</strong>.</p><h4>Retrieve Client ID and Client Secret</h4><p>Under the <strong>Auth</strong> tab, you’ll find the <strong>Client ID</strong> and <strong>Client Secret</strong>. Copy or store these safely — these values are critical for obtaining tokens later.</p><figure><img alt="Client ID and Client Secret" src="https://cdn-images-1.medium.com/max/1024/1*KCiOlOWbPxMd6whpaL39GQ.png" /></figure><h3>Obtaining OAuth2 Tokens</h3><p>Before proceeding with the Quickstart, ensure you have set the correct <strong>Redirect URL</strong> and obtained the <strong>Access Token</strong> or <strong>Refresh Token</strong> using the following steps:</p><ol><li>Construct the following URL and paste it in your browser. Replace the placeholder values with your own:</li></ol><pre>https://app.hubspot.com/oauth/authorize<br>    ?client_id=&lt;YOUR_CLIENT_ID&gt;<br>    &amp;scope=&lt;YOUR_SCOPES&gt;<br>    &amp;redirect_uri=&lt;YOUR_REDIRECT_URI&gt;</pre><p>2. Paste this URL into your browser. When prompted, select your HubSpot developer test account (or production account) to <strong>Install App</strong>.</p><figure><img alt="Account select" src="https://cdn-images-1.medium.com/max/1024/1*HIPE-Z-YEIS5EvDMe-LhQg.png" /></figure><p>3. After clicking <strong>Connect App</strong>, you will be redirected to &lt;YOUR_REDIRECT_URI&gt; with a code query parameter in the URL. Copy this code.</p><figure><img alt="Connect app" src="https://cdn-images-1.medium.com/max/1024/1*u33Cwk7SUMWl6d6IkWEVrg.png" /></figure><p>4. Use this code to request an <strong>Access Token</strong> and <strong>Refresh Token</strong>, for example, via cURL:</p><ul><li><strong>Linux/macOS</strong>:</li></ul><pre>curl --request POST \<br>  --url https://api.hubapi.com/oauth/v1/token \<br>  --header &#39;content-type: application/x-www-form-urlencoded&#39; \<br>  --data &#39;grant_type=authorization_code&amp;code=&lt;CODE&gt;&amp;redirect_uri=&lt;YOUR_REDIRECT_URI&gt;&amp;client_id=&lt;YOUR_CLIENT_ID&gt;&amp;client_secret=&lt;YOUR_CLIENT_SECRET&gt;&#39;</pre><ul><li><strong>Windows</strong>:</li></ul><pre>curl --request POST ^<br>  --url https://api.hubapi.com/oauth/v1/token ^<br>  --header &#39;content-type: application/x-www-form-urlencoded&#39; ^<br>  --data &#39;grant_type=authorization_code&amp;code=&lt;CODE&gt;&amp;redirect_uri=&lt;YOUR_REDIRECT_URI&gt;&amp;client_id=&lt;YOUR_CLIENT_ID&gt;&amp;client_secret=&lt;YOUR_CLIENT_SECRET&gt;&#39;</pre><p>This request will return a JSON response containing the access_token, refresh_token, and expires_in values:</p><pre>{<br>  &quot;token_type&quot;: &quot;bearer&quot;,<br>  &quot;refresh_token&quot;: &quot;&lt;Refresh Token&gt;&quot;,<br>  &quot;access_token&quot;: &quot;&lt;Access Token&gt;&quot;,<br>  &quot;expires_in&quot;: 1800<br>}</pre><p>5. Store the <strong>Refresh Token</strong> securely for use in your application since you’ll need it to obtain new access tokens when they expire.</p><h3>Quickstart</h3><p>Below is a minimal example of using the Hubspot CRM Owners connector in a Ballerina application.</p><ol><li>Import the Module</li></ol><pre>import ballerinax/hubspot.crm.owners as hsowners;<br>import ballerina/oauth2;</pre><p>2. Create a Config.toml file and configure your credentials:</p><pre>clientId = &quot;&lt;Client ID&gt;&quot;<br>clientSecret = &quot;&lt;Client Secret&gt;&quot;<br>refreshToken = &quot;&lt;Refresh Token&gt;&quot;</pre><p>3. Instantiate a hsowners:ConnectionConfig in your Ballerina code:</p><pre>configurable string clientId = ?;<br>configurable string clientSecret = ?;<br>configurable string refreshToken = ?;<br><br>hsowners:ConnectionConfig config = {<br>    auth: {<br>        clientId: clientId,<br>        clientSecret: clientSecret,<br>        refreshToken: refreshToken,<br>        credentialBearer: oauth2:POST_BODY_BEARER<br>    }<br>};<br><br>final hsowners:Client hubspotClient = check new (config);</pre><p>4. Use the connector to interact with HubSpot Owners data. For example:</p><pre>import ballerina/io;<br><br>public function main() returns error? {<br>    // Retrieve a page of Owners with limit=10<br>    hsowners:CollectionResponsePublicOwnerForwardPaging getPageOfOwners =<br>        check hubspotClient-&gt;/(&#39;limit = 10);<br><br>    io:println(&quot;Owners: &quot;, getPageOfOwners);<br>}</pre><h3>Examples</h3><p><a href="https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.owners/tree/main/examples/retrieve-owner-ids"><strong>Retrieve Owner IDs</strong></a>: Illustrates how to retrieve a page of owners in a HubSpot account, including owner ID, first name, and last name. You can use these details to assign CRM records across your team.</p><h3>Wrap-Up</h3><p>By following these steps, you can swiftly build integrations with HubSpot’s CRM Owners data. Ballerina’s connector approach, combined with strong type checking and built-in concurrency features, makes it easy to create and maintain production-ready applications.</p><p><strong>Key Takeaways</strong>:</p><ul><li><strong>Keep Credentials Secure</strong>: Your Client ID, Client Secret, and Refresh Token are sensitive details — store them safely.</li><li><strong>Refresh Tokens</strong>: Leverage the Refresh Token flow to handle token expirations gracefully.</li><li><strong>Exact Redirect URL</strong>: Always ensure the Redirect URL in your HubSpot app matches the one used in your OAuth flow.</li></ul><p>Happy Coding! If you found this guide useful, feel free to share it with your team or leave a star on the <a href="https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.owners">connector’s GitHub repository</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=607251d9e342" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>