<?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 Saurabh Singh on Medium]]></title>
        <description><![CDATA[Stories by Saurabh Singh on Medium]]></description>
        <link>https://medium.com/@target4ever101?source=rss-62928233f5da------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Zv3kNq9GSHh_8H4P</url>
            <title>Stories by Saurabh Singh on Medium</title>
            <link>https://medium.com/@target4ever101?source=rss-62928233f5da------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 18:56:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@target4ever101/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[Aspect-Oriented Programming]]></title>
            <link>https://medium.com/@target4ever101/aspect-oriented-programming-f86706243e20?source=rss-62928233f5da------2</link>
            <guid isPermaLink="false">https://medium.com/p/f86706243e20</guid>
            <category><![CDATA[aop]]></category>
            <category><![CDATA[aspectorientedprogramming]]></category>
            <category><![CDATA[aspect]]></category>
            <category><![CDATA[joinpoint]]></category>
            <category><![CDATA[advice]]></category>
            <dc:creator><![CDATA[Saurabh Singh]]></dc:creator>
            <pubDate>Sun, 08 Sep 2024 16:32:15 GMT</pubDate>
            <atom:updated>2024-09-10T12:42:23.842Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oVVmmY8S8oaCfL0DU5kp8w.png" /></figure><p>Aspect-Oriented Programming (AOP) in Spring Boot is a powerful feature that allows you to separate cross-cutting concerns (like logging, transaction management, security, etc.) from the business logic of your application. This separation of concerns makes your code cleaner and more maintainable.</p><h3>Key Concepts of AOP in Spring Boot</h3><ol><li><strong>Aspect</strong>: A module that encapsulates a concern that cuts across multiple classes. For example, a logging aspect that logs method execution across the application.</li><li><strong>Join Point</strong>: A point during the execution of a program, such as the execution of a method or the handling of an exception. In Spring AOP, a join point is always a method execution.</li><li><strong>Advice</strong>: The action taken by an aspect at a particular join point. There are different types of advice:</li></ol><ul><li><strong>Before</strong>: Executed before the join point method.</li><li><strong>After</strong>: Executed after the join point method, regardless of its outcome.</li><li><strong>After Returning</strong>: Executed after the join point method if it completes successfully.</li><li><strong>After Throwing</strong>: Executed if the join point method exits by throwing an exception.</li><li><strong>Around</strong>: Surrounds a join point, allowing you to perform actions before and after the method execution.</li></ul><p>4.<strong> Pointcut</strong>: A predicate that matches join points. A pointcut expression determines where advice should be applied.</p><p>5.<strong> Weaving</strong>: The process of linking aspects with other application types or objects to create an advised object. This can happen at compile-time, load-time, or runtime.</p><h3>Example of AOP in Spring Boot</h3><h4>Using AOP for Logging</h4><h4>1. Adding the necessary dependency</h4><p>If you’re using Maven, make sure you have the following dependency in your pom.xml:</p><pre>&lt;dependency&gt;<br>    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>    &lt;artifactId&gt;spring-boot-starter-aop&lt;/artifactId&gt;<br>&lt;/dependency&gt;</pre><h4>2. Defining an Aspect</h4><p>Here’s a simple example of a logging aspect:</p><pre>Transaction Management: Handle transactions automatically around methods.import org.aspectj.lang.annotation.Aspect;<br>import org.aspectj.lang.annotation.Before;<br>import org.aspectj.lang.annotation.AfterReturning;<br>import org.aspectj.lang.annotation.AfterThrowing;<br>import org.aspectj.lang.annotation.Around;<br>import org.aspectj.lang.ProceedingJoinPoint;<br>import org.slf4j.Logger;<br>import org.slf4j.LoggerFactory;<br>import org.springframework.stereotype.Component;<br><br>@Aspect<br>@Component<br>public class LoggingAspect {<br><br>    private static final Logger logger = LoggerFactory.getLogger(LoggingAspect.class);<br><br>    // Before advice<br>    @Before(&quot;execution(* com.example.service.*.*(..))&quot;)<br>    public void logBefore() {<br>        logger.info(&quot;Method is about to be executed.&quot;);<br>    }<br><br>    // After returning advice<br>    @AfterReturning(pointcut = &quot;execution(* com.example.service.*.*(..))&quot;, returning = &quot;result&quot;)<br>    public void logAfterReturning(Object result) {<br>        logger.info(&quot;Method executed successfully, result: &quot; + result);<br>    }<br><br>    // After throwing advice<br>    @AfterThrowing(pointcut = &quot;execution(* com.example.service.*.*(..))&quot;, throwing = &quot;exception&quot;)<br>    public void logAfterThrowing(Exception exception) {<br>        logger.error(&quot;Method threw an exception: &quot; + exception.getMessage());<br>    }<br><br>    // Around advice<br>    @Around(&quot;execution(* com.example.service.*.*(..))&quot;)<br>    public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable {<br>        logger.info(&quot;Method execution starts: &quot; + joinPoint.getSignature().getName());<br>        Object result = joinPoint.proceed();  // Proceed with method execution<br>        logger.info(&quot;Method execution ends: &quot; + joinPoint.getSignature().getName());<br>        return result;<br>    }<br>}</pre><p>In this example:</p><ul><li>@Before: Logs before any method in the specified package is executed.</li><li>@AfterReturning: Logs after a method completes successfully.</li><li>@AfterThrowing: Logs if a method throws an exception.</li><li>@Around: Logs both before and after the method execution, and allows you to control the execution flow.</li></ul><h4>3. Enabling AspectJ Auto Proxy</h4><p>Make sure your Spring Boot application is configured to scan for aspects:</p><pre>import org.springframework.boot.SpringApplication;<br>import org.springframework.boot.autoconfigure.SpringBootApplication;<br>import org.springframework.context.annotation.EnableAspectJAutoProxy;<br><br>@SpringBootApplication<br>@EnableAspectJAutoProxy<br>public class MySpringBootApplication {<br><br>    public static void main(String[] args) {<br>        SpringApplication.run(MySpringBootApplication.class, args);<br>    }<br>}</pre><h3>Practical Use Cases</h3><ul><li><strong>Logging</strong>: Centralize logging logic using aspects.</li><li><strong>Security</strong>: Apply security checks before method execution.</li><li><strong>Transaction Management</strong>: Handle transactions automatically around methods.</li><li><strong>Exception Handling</strong>: Manage exceptions in a unified manner across different methods.</li></ul><p>AOP is a great way to keep your code clean and focused on the business logic, while still handling common concerns across your application consistently.</p><h3>Using AOP for Security Checks</h3><p>Here’s how you can implement security checks using AOP in a Spring Boot application:</p><h4>1. Define a Custom Security Annotation</h4><p>First, create a custom annotation that will be used to mark the methods that require security checks.</p><pre>import java.lang.annotation.ElementType;<br>import java.lang.annotation.Retention;<br>import java.lang.annotation.RetentionPolicy;<br>import java.lang.annotation.Target;<br><br>@Target(ElementType.METHOD)<br>@Retention(RetentionPolicy.RUNTIME)<br>public @interface Secured {<br>    String role() default &quot;USER&quot;;<br>}</pre><p>In this example, the @Secured annotation takes an optional role parameter that specifies the role required to execute the annotated method.</p><h4>2. Create a Security Aspect</h4><p>Next, create an aspect that intercepts method calls to methods annotated with @Secured and performs the security check.</p><pre>import org.aspectj.lang.ProceedingJoinPoint;<br>import org.aspectj.lang.annotation.Around;<br>import org.aspectj.lang.annotation.Aspect;<br>import org.springframework.beans.factory.annotation.Autowired;<br>import org.springframework.security.core.context.SecurityContextHolder;<br>import org.springframework.security.core.userdetails.UserDetails;<br>import org.springframework.stereotype.Component;<br><br>@Aspect<br>@Component<br>public class SecurityAspect {<br><br>    @Around(&quot;@annotation(secured)&quot;)<br>    public Object checkSecurity(ProceedingJoinPoint joinPoint, Secured secured) throws Throwable {<br>        // Get the current user&#39;s roles from the security context<br>        UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();<br>        <br>        // Check if the user has the required role<br>        if (userDetails.getAuthorities().stream()<br>                .anyMatch(authority -&gt; authority.getAuthority().equals(secured.role()))) {<br>            // Proceed with method execution if the user has the required role<br>            return joinPoint.proceed();<br>        } else {<br>            // Throw an exception or return an error response if the user doesn&#39;t have the required role<br>            throw new SecurityException(&quot;User does not have the required role: &quot; + secured.role());<br>        }<br>    }<br>}</pre><p>In this aspect:</p><ul><li>@Around(&quot;@annotation(secured)&quot;) intercepts any method annotated with @Secured.</li><li>The checkSecurity method retrieves the current user&#39;s roles from the security context and checks if they match the required role specified in the @Secured annotation.</li><li>If the user has the required role, the method proceeds; otherwise, a SecurityException is thrown.</li></ul><h4>3. Apply the Custom Security Annotation</h4><p>Now you can use the @Secured annotation on any method where you want to enforce a security check.</p><pre>import org.springframework.stereotype.Service;<br><br>@Service<br>public class BookService {<br><br>    @Secured(role = &quot;ADMIN&quot;)<br>    public void addBook(Book book) {<br>        // Logic to add a new book<br>    }<br><br>    @Secured(role = &quot;USER&quot;)<br>    public Book getBookDetails(Long bookId) {<br>        // Logic to retrieve book details<br>        return new Book();<br>    }<br>}</pre><p>In this example:</p><ul><li>The addBook method is restricted to users with the ADMIN role.</li><li>The getBookDetails method is accessible to users with the USER role.</li></ul><p>Thanks for Reading, Hope you enjoyed 😎.</p><p>Github Repo: <a href="https://github.com/saurabh-ssingh/aop">https://github.com/saurabh-ssingh/aop</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f86706243e20" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Custom annotation in Spring Boot]]></title>
            <link>https://medium.com/@target4ever101/custom-annotation-in-spring-boot-aba8b305d18c?source=rss-62928233f5da------2</link>
            <guid isPermaLink="false">https://medium.com/p/aba8b305d18c</guid>
            <category><![CDATA[custom-annotation]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[time-tracking]]></category>
            <category><![CDATA[aspectorientedprogramming]]></category>
            <category><![CDATA[aspect]]></category>
            <dc:creator><![CDATA[Saurabh Singh]]></dc:creator>
            <pubDate>Tue, 20 Aug 2024 11:43:39 GMT</pubDate>
            <atom:updated>2024-08-20T13:36:52.874Z</atom:updated>
            <content:encoded><![CDATA[<p>Creating a custom annotation in Spring Boot involves several steps. Below is a guide on how to do this:</p><p><strong>Step 1: Create the Custom Annotation</strong></p><p>In Java, @interface is used to define a custom annotation. Annotations in Java provide metadata about the code but do not directly affect the execution.</p><p>“First, create a custom annotation named @TrackTime. You can adjust the annotation name as needed, but in this case, we&#39;ll use TrackTime.&quot;</p><pre>import java.lang.annotation.ElementType;<br>import java.lang.annotation.Retention;<br>import java.lang.annotation.RetentionPolicy;<br>import java.lang.annotation.Target;<br><br>@Retention(RetentionPolicy.RUNTIME)<br>@Target(ElementType.METHOD)<br>public @interface TrackTime {<br>}</pre><p><strong>Example of Custom Annotation Definition</strong></p><pre>public @interface MyCustomAnnotation {<br>    String value() default &quot;default value&quot;;<br>}</pre><ul><li><strong>@interface Keyword</strong>: This keyword is used to declare an annotation. It tells the compiler that you&#39;re defining a new annotation type.</li><li><strong>Element Definitions</strong>: Inside the annotation, you can define elements (like value in the example above). These elements can be thought of as methods that return a value, but they&#39;re actually part of the annotation&#39;s metadata. You can define default values for these elements, making them optional when the annotation is used.</li></ul><p><strong>Using the Custom Annotation</strong></p><p>Once you’ve defined a custom annotation, you can use it in your code as follows:</p><pre>@MyCustomAnnotation(value = &quot;Example usage&quot;)<br>public void myMethod() {<br>    // Method implementation<br>}</pre><p>In this example, @MyCustomAnnotation is applied to the myMethod method. The value element is provided with the string &quot;Example usage&quot;.</p><h3>Key Points about Annotations</h3><ol><li><strong>Retention Policy</strong>: Specifies how long annotations are retained. Common options are:</li></ol><ul><li>RetentionPolicy.SOURCE: Annotations are discarded by the compiler and not included in the compiled class files.</li><li>RetentionPolicy.CLASS: Annotations are included in the class files but not available at runtime.</li><li>RetentionPolicy.RUNTIME: Annotations are available at runtime, which is useful for reflection-based processing.</li></ul><pre>@Retention(RetentionPolicy.RUNTIME)<br>public @interface MyRuntimeAnnotation {<br>}</pre><p><strong>Target</strong>: Specifies where the annotation can be applied, such as methods, fields, classes, etc.</p><pre>@Target(ElementType.METHOD)<br>public @interface MyMethodAnnotation {<br>}</pre><p><strong>Note:</strong></p><p>Other possible values for @Target include TYPE(class, interface, enum), FIELD(field declaration), PRAMETER(method parameter), CONSTRUCTOR(constructor declaration), etc.</p><p><strong>Default Values</strong>: Elements within an annotation can have default values, making them optional when the annotation is used.</p><pre>public @interface MyCustomAnnotation {<br>    String value() default &quot;default value&quot;;<br>}</pre><p><strong>Multiple Elements with Default Values</strong></p><p>You can define multiple elements in an annotation, and each element can have its own default value. However, each element can only have one default value.</p><pre>public @interface MyCustomAnnotation {<br>    String value() default &quot;default value&quot;;  // Default value for &#39;value&#39;<br>    int count() default 5;                   // Default value for &#39;count&#39;<br>    boolean enabled() default true;          // Default value for &#39;enabled&#39;<br>}</pre><p><strong>Step 2: Create an Aspect to Handle the Annotation</strong></p><p>Next, create an Aspect using Spring AOP (Aspect-Oriented Programming) that will intercept the methods annotated with @TrackTime and log their execution time.</p><pre>package com.example.aspect;<br><br>import org.aspectj.lang.annotation.Aspect;<br>import org.aspectj.lang.annotation.Around;<br>import org.aspectj.lang.ProceedingJoinPoint;<br>import org.slf4j.Logger;<br>import org.slf4j.LoggerFactory;<br>import org.springframework.stereotype.Component;<br><br>@Aspect<br>@Component<br>public class TrackTimeAspect {<br><br>    // Logger to log the execution time<br>    private static final Logger logger = LoggerFactory.getLogger(TrackTimeAspect.class);<br><br>    // Advice that surrounds the execution of a method annotated with @TrackTime<br>    @Around(&quot;@annotation(com.example.annotation.TrackTime)&quot;)<br>    public Object trackTime(ProceedingJoinPoint joinPoint) throws Throwable {<br>        // Capture start time before method execution<br>        long startTime = System.currentTimeMillis();<br><br>        // Execute the actual method<br>        Object proceed = joinPoint.proceed();<br><br>        // Capture end time after method execution<br>        long endTime = System.currentTimeMillis();<br>        <br>        // Calculate and log the execution time<br>        long executionTime = endTime - startTime;<br>        logger.info(&quot;{} executed in {} ms&quot;, joinPoint.getSignature(), executionTime);<br><br>        // Return the result of the method execution<br>        return proceed;<br>    }<br>}</pre><h3><strong>@Aspect annotation</strong></h3><p>The @Aspect annotation is part of Spring AOP (Aspect-Oriented Programming) and is used to define an aspect. An aspect is a modularization of a cross-cutting concern, such as logging, transaction management, or security, which can be applied across multiple points of an application.</p><h4>Meaning of Modularization in AOP</h4><p>When we talk about modularization in AOP, we’re referring to the practice of isolating cross-cutting concerns — like logging, transaction management, security, etc. — into separate, reusable, and independent modules known as aspects.</p><h3><strong>@Around annotation</strong></h3><p>In AOP, the @Around annotation is a type of advice that allows you to intercept the execution of a method multiple times.</p><ol><li>Before the method is called</li><li>After the method is called (regardless of whether it throws an exception)</li><li>Around the method execution, giving you complete control over the flow.</li></ol><h4><strong>How is it used?</strong></h4><p>The @Around annotation is typically used within an aspect class, which is a special class that encapsulates cross-cutting concerns like logging, security, or transaction management.</p><p>The @Around annotation is applied to a method within the aspect the define that defines the logic to be executed around the target method.</p><h4><strong>Explanation of </strong><strong>ProceedingJoinPoint</strong></h4><p>The @Around method receives a ProceedingJointPoint object as a parameter. The object provides information about the target method being intercepted such as signature, arguments, and return value.</p><h3>Key Methods of ProceedingJoinPoint</h3><h4><strong>proceed()</strong>:</h4><ul><li>This method is used to execute the intercepted method. If you don’t call proceed(), the method will not be executed, effectively skipping the method&#39;s execution.</li></ul><p>Example: Object result = joinPoint.proceed();</p><p>You can also modify the behavior by changing the arguments passed to the method or the returned value.</p><h4><strong>proceed(Object[] args)</strong>:</h4><ul><li>This overloaded version of proceed() allows you to execute the method with different arguments. The args parameter is an array of objects that represents the method&#39;s arguments.</li><li>Example: Object result = joinPoint.proceed(new Object[]{&quot;modifiedArg&quot;});</li></ul><h4><strong>getSignature()</strong>:</h4><ul><li>This method returns a Signature object representing the method&#39;s signature (i.e., the method&#39;s name, return type, and parameter types).</li><li>Example: MethodSignature signature = (MethodSignature) joinPoint.getSignature();</li></ul><h4><strong>getArgs()</strong>:</h4><ul><li>This method returns an array of Objects representing the arguments passed to the method.</li><li>Example: Object[] args = joinPoint.getArgs();</li></ul><h4><strong>getTarget()</strong>:</h4><ul><li>This method returns the target object (the actual object on which the method is being invoked).</li><li>Example: Object targetObject = joinPoint.getTarget();</li></ul><h4><strong>getThis()</strong>:</h4><ul><li>This method returns the proxy object (the Spring-managed bean that is a proxy of the target object).</li><li>Example: Object proxyObject = joinPoint.getThis();</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aba8b305d18c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fetching employee data from Zoho using Postman]]></title>
            <link>https://medium.com/@target4ever101/fetching-employee-data-from-zoho-using-postman-708e64d24142?source=rss-62928233f5da------2</link>
            <guid isPermaLink="false">https://medium.com/p/708e64d24142</guid>
            <category><![CDATA[zoho-people]]></category>
            <category><![CDATA[zoho-implementation]]></category>
            <category><![CDATA[get-employee-data-zoho]]></category>
            <category><![CDATA[zoho-integrations]]></category>
            <category><![CDATA[zoho]]></category>
            <dc:creator><![CDATA[Saurabh Singh]]></dc:creator>
            <pubDate>Sat, 23 Sep 2023 07:51:30 GMT</pubDate>
            <atom:updated>2023-09-23T08:17:40.566Z</atom:updated>
            <content:encoded><![CDATA[<h4>Step 1: Create an account on Zoho</h4><ol><li>Visit on Zoho website https://www.zoho.com/ and on the upper right side, there is an option of Sign Up.</li><li>Click on Sign Up.</li><li>After clicking on Sign Up, you could look at an interface something like below</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8gxCZAZ7WuqeRpCj" /></figure><p>4. Here I am going to click on Google options and enter the valid Google credential. You can use other options if you want.</p><p>5. After that your account is created.</p><h4>Step 2: Add sample data</h4><ol><li>After successful login, you will see a new interface, like below</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cSGrGEGb8mz4m2OT" /></figure><p>2. Here you find multiple options like CRM, Mail, Desk, People, Creator, Books, Projects, and Connect.</p><p>3. You have to click on People.</p><p>4. After clicking on People you will look at a new interface like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*n11D8UqQOtWdaiWV" /></figure><p>5. Click on Access Zoho People.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YF57cOLeUxNtymNR" /></figure><p>6. Click on Take 30 days free trial.</p><p>7. After that a form will appear, and we have to fill in information like organization name, portal name, industry, and phone number. After that click on Update.</p><p>8. After clicking on update another pop-up will that is asking, Would you like us to load sample data into your Zoho People account?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/0*Jws4LvR75cl0Pnvw" /></figure><p>9. Click on Yes, Generate Data.</p><p>10. After that it automatically generates some data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GUJql2E_AkD9Hue8" /></figure><p>11. If you want to look, at what data is generated you can go to the organization tab and you can look into it.</p><p>12. Now we have created some sample data, our next step is to access this data.</p><p>13. To access this sample data we need the client ID, client secret, and authorization code.</p><h4><strong>Step 3: Generating client ID, client secret, and authorization code</strong></h4><ol><li>The Zoho API Console provides you with OAuth credentials to help you build applications using Zoho APIs.</li><li>You must register your application at the Zoho API Console to receive your Client ID and Client Secret.</li></ol><ul><li><strong>Client ID</strong> is a unique identifier you receive when you register your application with Zoho.</li><li><strong>Client Secret</strong> is a unique key generated when you register your application with Zoho. This must be kept confidential.</li><li><strong>Authorized redirect URI</strong> is a URI endpoint for client-based applications to which Zoho Accounts has to redirect the user-agent with the access token after authorizing the client.</li><li><strong>Client Type</strong> is the type of application you develop. Client type includes Client-based applications, Server-based applications, Mobile-based applications, Non-browser applications, and Self Client.</li></ul><p>3. To generate the client ID, client secret, and authorization code we have to visit the Zoho API console using this link https://api-console.zoho.com/ .</p><figure><img alt="After visiting on above link we got an option to sign in." src="https://cdn-images-1.medium.com/max/920/0*1aIhMNUJzDKT5YuS" /></figure><p>4. Click on the Google symbol for sign-in. After successful login, you will go to another page and click on Get Started.</p><p>5. After that you got the option to choose the client type:</p><blockquote>Client-based Applications</blockquote><blockquote>Server-bases Applicati</blockquote><blockquote>Mobile-bases Application</blockquote><blockquote>Non-browser Application</blockquote><blockquote>Self-client</blockquote><p>6. Hover over the Self Client and click <strong>CREATE NOW</strong>, then click <strong>OK</strong>.</p><p>7. You will receive the client credentials such as Client ID and Client Secret.</p><p>8. You can generate an authorization code by filling in valid scope details and setting the time duration under Generate Code.</p><h4><strong>Step 4. Generating Access Token and Refresh Token</strong></h4><p>If you want to know more about access tokens and refresh tokens visit <a href="https://medium.com/@target4ever101/zoho-access-token-v-s-refresh-token-bf7419b88e2d">https://medium.com/@target4ever101/zoho-access-token-v-s-refresh-token-bf7419b88e2d</a></p><ol><li>To generate an access token and refresh token, go to Postman and make a post request on the URL https://accounts.zoho.in/oauth/v2/token.</li><li>Inside the param section write some key-value pair:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*JhDCf2gHkMNp3JHyvWoT2w.png" /></figure><p>3. In client_id, client_secret, and code, write those values that you obtained from the Zoho API console.</p><h4>Step 5. Fetching employee data</h4><ol><li>Make a new Get request on URL https://people.zoho.in/people/api/forms/employee/getRecords</li></ol><p>2. Go to the header section and make a new key Authorization and value is</p><p>Zoho-oauthtoken &lt;access_token&gt;</p><p>3. Replace &lt;access_token&gt; with your access token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*rWzEI1knKBDd9kEDs5jdUA.png" /></figure><h4>Step 6. Retrieve a new access token</h4><ol><li>Make a post request on URL https://accounts.zoho.in/oauth/v2/token</li></ol><p>2. Go on Params and write some key and value</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*9h5lSOGm2ZYWTN1VUEopYA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=708e64d24142" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>