Socket
Socket
Sign inDemoInstall

chat-gpt-authenticator

Package Overview
Dependencies
16
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    chat-gpt-authenticator

OpenAI Authentication Library for ChatGPT


Version published
Weekly downloads
46
increased by48.39%
Maintainers
1
Install size
1.25 MB
Created
Weekly downloads
 

Readme

Source

CI Workflow

ChatGPT Authenticator

This node library is based on this python implementation.

How to use

Create an Open AI account in this link.

Methods

//requests a new token or return a token that has already been fetched
chatGPTAuthTokenService.getToken() : <Promise>

//requests a new token
chatGPTAuthTokenService.refreshToken() : <Promise>

ES Modules

import { ChatGPTAuthTokenService } from "chat-gpt-authenticator";

const chatGptAuthTokenService = new ChatGPTAuthTokenService(
  "OPEN_AI_EMAIL",
  "OPEN_AI_PASSWORD"
);

(async () => {
  const token = await chatGptAuthTokenService.getToken();
  console.log(token);

  token = await chatGPTAuthTokenService.refreshToken();
  console.log(token);
})();

Common JS

const { ChatGPTAuthTokenService } = require("chat-gpt-authenticator");

const chatGPTAuthTokenService = new ChatGPTAuthTokenService(
  "OPEN_AI_EMAIL",
  "OPEN_AI_PASSWORD"
);

(async () => {
  let token = await chatGPTAuthTokenService.getToken();
  console.log(token);

  token = await chatGPTAuthTokenService.refreshToken();
  console.log(token);
})();

FAQs

Last updated on 27 Feb 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc