legit-api-token-jwt

Construct an HS512-signed JWS and POST it to obtain a Legit JWT.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/tombelial666/test --skill legit-api-token-jwt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: legit-api-token-jwt
Source: https://github.com/tombelial666/test/tree/main/.cursor/skills/legit-api-token-jwt
Command: npx skills add https://github.com/tombelial666/test --skill legit-api-token-jwt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Acquire a Legit JWT for Legit-protected APIs by constructing a compliant JWS and exchanging it for a token, enabling authenticated access and debugging 401 errors.

Core Features & Use Cases

  • Build a JWS with HS512 using the required header (cty: JWS, alg: HS512) and body (username, entity, datetime) and the correct Base64URL encoding.
  • POST the JWS to the Legit endpoint to retrieve a JWT that can be used in Authorization headers for APEX/Legit API calls.
  • Support automated token generation via Node scripts or Postman workflows for CI and local development.

Quick Start

Configure your environment with APEX_LEGIT_USERNAME, APEX_LEGIT_ENTITY, and APEX_SHARED_SECRET, then run the Node script to generate and obtain the JWT from the Legit endpoint.

Frequently Asked Questions about legit-api-token-jwt

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a JWT for Legit-protected APIs using HS512?

You generate a Legit JWT by constructing a JWS with an HS512 signature, including the required header and body, then POSTing it to the Legit endpoint to retrieve your authentication token.

Why do I get a 401 error when calling APEX or Legit APIs?

A 401 error occurs when your JWT is missing, expired, or incorrectly formatted. Constructing a compliant HS512 JWS and exchanging it for a valid token resolves this authentication failure.

What header and body format is required for a Legit JWS?

The JWS requires a header with cty set to JWS and alg set to HS512, while the body must contain your username, entity, and datetime using correct Base64URL encoding.

Can I automate API token generation for Legit in CI pipelines?

Yes, you can automate token retrieval by configuring environment variables and running a Node script or Postman workflow to generate the JWS and obtain the JWT for CI and local development.

What environment variables do I need to configure for Legit token retrieval?

You must configure APEX_LEGIT_USERNAME, APEX_LEGIT_ENTITY, and APEX_SHARED_SECRET in your environment to generate the JWS and retrieve the JWT successfully.