npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

api-auth-zoho

v1.0.22

Published

Designed to simplify Zoho API authorization

Readme

Zoho OAuth Code Generator

This is a simple code generator for initiating the Zoho OAuth 2.0 flow. You can use this to request an authorization code for Zoho API access.

Installation

There is no installation process required for this package. Simply include the code snippet within your project.

Usage

CommonJS

const getZohoAuthCode = require('./path/to/your/package.so'); // Replace with actual path

// Example usage
const scope = 'ZohoCRM.ALL'; // Replace with desired scope
const client_id = 'YOUR_ZOHO_CLIENT_ID';
const redirect_uri = 'YOUR_REDIRECT_URI';

getZohoAuthCode(scope, client_id, redirect_uri);

How It Works

  1. Initiates Zoho OAuth Flow:
    The getZohoAuthCode function constructs a URL to initiate the Zoho OAuth 2.0 authorization flow.

  2. Redirects User:
    The user's browser is redirected to Zoho's authorization page.

  3. User Authorization:
    The user grants your application permission to access their Zoho data.

  4. Redirect to Redirect URI:
    After authorization, Zoho redirects the user back to your specified redirect_uri with an authorization code in the query string.

Parameters

  • scope (string, required):
    A space-separated list of Zoho API permissions you're requesting. For example, ZohoCRM.ALL grants full access to Zoho CRM.

  • client_id (string, required):
    Your Zoho application's unique client ID. This is essential for identifying your application to Zoho.

  • redirect_uri (string, required):
    The URL where Zoho will redirect the user after they authorize your application. This URL should be registered in your Zoho application settings.

  • access_type (string, optional):
    Specifies the type of access token you're requesting.

    • offline (default): Requests a refresh token, allowing you to obtain new access tokens without user interaction.
    • online: Requests a short-lived access token that expires after a certain period.

Additional Notes

  • Authorization Code:
    The authorization code received in the redirect_uri is a temporary credential.

  • Access Token:
    You'll need to exchange this authorization code for an access token on your server-side.

  • Access Token Usage:
    The access token grants your application permission to interact with the Zoho API.

  • Zoho Documentation:
    Refer to Zoho's official documentation for detailed instructions on handling the authorization response and obtaining access tokens: Zoho API Documentation.