Api Connection logo

Api Connection

Organization
rejot-dev
api-connection

Configure and use Backoffice API connections. Use when creating outbound HTTP API integrations, configuring OAuth or bearer authentication, starting API OAuth flows, checking auth status, or executing authenticated API requests from automations.

Overview

Publisherrejot-dev
Repositoryfragno
Skill nameapi-connection
Stars
62
Forks
6
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by rejot-dev on GitHub. Read the source before you install it.

Installation

Install the Api Connection AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/rejot-dev/fragno.git /tmp/fragno
mkdir -p .claude/skills
cp -r /tmp/fragno/apps/backoffice/content/static/skills/api-connection .claude/skills/api-connection
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Api Connection in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Api Connection on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Api Connection is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

API Connection

Use this skill for scope-aware outbound HTTP API connections, OAuth PKCE authentication, bearer tokens, client credentials, and API requests through Backoffice runtimes.

API configuration

The API capability is available automatically for the current scope. Create each external API connection with a stable lowercase slug and a base URL.

  • Use api.* methods for API connections.
  • Register the public OAuth callback route /api/http/:scope/oauth/callback for scoped OAuth connections.
  • Use relative request paths, for example /v1/customers. If the user gives https://example.com/v1/customers and the connection base URL is https://example.com, call api.request with path: "/v1/customers".
  • Let stored connection auth replace caller-provided Authorization headers.
  • If the user supplies a client secret in the session and asks you to configure the connection, pass it to api.createConnection and keep the final response secret-free.

Rules:

  • When configuring a new OAuth connection, ALWAYS immediately start OAuth and give the user the returned authorizationUrl in a clickable way.
  • When the user says anything after you've presented them with the link, ALWAYS check status of the connection and report back to the user.

Typical OAuth setup flow:

  1. Create the API connection with the requested auth configuration.
  2. For OAuth connections, immediately start OAuth after creating the connection and give the returned authorization URL to the user:
js
const connection = await api.createConnection({
  slug: "example-api",
  name: "Example API",
  baseUrl: "https://api.example.com",
  auth: {
    type: "oauth",
    authorizationEndpoint: "https://api.example.com/oauth/authorize",
    tokenEndpoint: "https://api.example.com/oauth/token",
    clientId: "example-client",
    clientSecret: "example-client-secret",
    scopes: ["profile", "email", "read"],
    tokenEndpointAuthMethod: "client_secret_post",
  },
});

const oauth = await api.startOAuth({ slug: connection.slug });
return { connection, authorizationUrl: oauth.authorizationUrl };
  1. When the user responds after opening the OAuth URL, always check authentication status:
js
const status = await api.getAuthStatus({ slug: "example-api" });
return status;
  1. If authentication is successful, tell the user the connection is authenticated and ask whether they want to try an API call.
  2. When the user wants to test an API call, call api.request with a relative path and include Accept: "application/json" for JSON APIs.

Bearer setup example:

js
await api.createConnection({
  slug: "stripe",
  name: "Stripe",
  baseUrl: "https://api.stripe.com",
  auth: { type: "bearer", token: process.env.STRIPE_TOKEN },
});

OAuth setup example for a confidential server-side client:

js
await api.createConnection({
  slug: "example-api",
  name: "Example API",
  baseUrl: "https://api.example.com",
  auth: {
    type: "oauth",
    authorizationEndpoint: "https://api.example.com/oauth/authorize",
    tokenEndpoint: "https://api.example.com/oauth/token",
    clientId: "example-client",
    clientSecret: "example-client-secret",
    scopes: ["profile", "email", "read"],
    tokenEndpointAuthMethod: "client_secret_post",
  },
});

const auth = await api.startOAuth({ slug: "example-api" });
return auth.authorizationUrl;

OAuth connections run server-side in Backoffice. Use the token endpoint auth method configured for the provider's OAuth app registration. Confidential clients usually use tokenEndpointAuthMethod: "client_secret_post" or "client_secret_basic" with clientSecret. Public PKCE client registrations use tokenEndpointAuthMethod: "none" with client id and scopes.

OAuth restart and troubleshooting notes:

  • To restart OAuth with unchanged settings, call api.startOAuth({ slug }) and give the user the newest authorizationUrl.
  • To restart OAuth after auth settings were removed or the connection shows authMode: "none", recreate the connection with the full OAuth config and then call api.startOAuth({ slug }).
  • After changing tokenEndpointAuthMethod, client secret, scopes, endpoints, or redirect route, start OAuth again and tell the user to use the newest OAuth tab. Old authorization URLs contain old state, redirect URI, and PKCE challenge data.
  • If the callback reports The client cannot authenticate with methods: [...], the authorization step succeeded and the token exchange failed. Align the configured tokenEndpointAuthMethod with the provider-side OAuth app registration. Use "client_secret_post" or "client_secret_basic" for confidential client registrations, and use "none" for public PKCE client registrations.
  • If a previously failing client starts working after provider-side changes, recreate or update the connection and generate a fresh authorization URL before retesting.

API events

Cataloged automation events:

  • source: api, eventType: connection.changed — fires when an API connection is created or its configuration changes.
  • source: api, eventType: connection.deleted — fires when an API connection is deleted.
  • source: api, eventType: connection.available — fires when auth becomes usable after bearer setup, OAuth callback, or client-credentials token acquisition. Connection hook payloads include connectionId and a connection snapshot with slug, name, baseUrl, authMode, and status.

API tools

API tools can:

  • list configured API connections;
  • create and delete outbound HTTP API connections;
  • inspect auth status;
  • store bearer tokens;
  • start OAuth login;
  • delete stored auth;
  • execute authenticated HTTP requests through a configured connection.

Use codemode first. The api provider methods are listConnections, createConnection, deleteConnection, getAuthStatus, setToken, startOAuth, deleteAuth, and request.

Examples:

js
await api.listConnections();
await api.getAuthStatus({ slug: "example-api" });
await api.request({
  slug: "example-api",
  method: "GET",
  path: "/v1/resources",
  headers: { Accept: "application/json" },
  timeoutMs: 30_000,
});

For JSON request bodies, use api.request --json '{"key":"value"}'. For text bodies, use --body.

Request debugging notes:

  • Always check api.getAuthStatus({ slug }) before debugging an API request. authenticated: true means OAuth credentials are stored; returned HTTP 404, 405, or 500 statuses are upstream API responses.
  • Treat upstream 4xx and 5xx responses from api.request as response data with status, statusText, headers, and body.
  • If a user provides a full URL, convert it to a relative path for the configured connection base URL.
  • For endpoints like token introspection, inspect the upstream Allow and WWW-Authenticate headers. A 405 with Allow: OPTIONS, POST means retry with POST; a 401 invalid_client means that endpoint requires its own client authentication and often a form body such as a token parameter.
  • If you see a runtime validation error about missing statusText, rebuild or restart the API fragment/runtime; current API responses include statusText.

Frequently asked questions

What does the Api Connection AI skill do?

Configure and use Backoffice API connections. Use when creating outbound HTTP API integrations, configuring OAuth or bearer authentication, starting API OAuth flows, checking auth status, or executing authenticated API requests from automations.

Why use Api Connection on TypingMind?

Because you install it once and use it with any model. Api Connection is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Api Connection in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/rejot-dev/fragno/tree/main/apps/backoffice/content/static/skills/api-connection. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Api Connection?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Api Connection?

As many as you like. As long as a model supports skills, you can use Api Connection with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Api Connection AI skill free?

Yes. It is published on GitHub by rejot-dev under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇