Set up first authenticated request from CLI

Created on 20 May 2025, 25 days ago

Overview

The CLI tool needs to be able to send HTTP requests to the relevant API endpoints, and be authenticated via the solution introduced in Implement OAuth2 authentication for API endpoints related to code components Active .

→ See: 🌱 [Meta] CLI tool for code components Active

Proposed resolution

  1. Read the documentation on how to set up consumers produced in Implement OAuth2 authentication for API endpoints related to code components Active .
  2. Implement reading the followings from environment variables or a .env file — e.g., using dotenv:
    1. Drupal site base URL
    2. Client ID
    3. Client secret
  3. Use an OAuth2 client library implemented in Node.js, make the CLI tool execute a single HTTP request to /api/v0/config/js_component, and simply print the results. Use the /oauth/token route to retrieve an access token.
📌 Task
Status

Postponed

Version

0.0

Component

CLI Tool

Created by

🇳🇱Netherlands balintbrews Amsterdam, NL

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024