appfolio-install-auth

v2026.09.24

Configure AppFolio Stack API authentication with OAuth 2.0. Use when setting up property management API access, registering as an AppFolio Stack partner, or configuring client credentials for API calls. Trigger: "install appfolio", "setup appfolio", "appfolio auth", "appfolio API key".

GitHub
安装命令
npx skhub add jeremylongshore/appfolio-install-auth
Markdown
SKILL.md

AppFolio Install & Auth

Overview

Configure AppFolio Stack API authentication. AppFolio uses HTTP Basic Auth with a client ID and client secret, provided through their Stack partner program. No public npm SDK exists — use direct REST API calls.

Prerequisites

  • AppFolio Stack partner account (appfolio.com/stack)
  • Client ID and Client Secret from AppFolio
  • Node.js 18+ or Python 3.10+

Instructions

Step 1: Obtain API Credentials

# AppFolio Stack API credentials come from the partner program
# 1. Apply at appfolio.com/stack/become-a-partner
# 2. Complete integration review
# 3. Receive the provider-issued base URL and credential delivery instructions.
# Store the values in the approved secret manager. Commit only this non-secret
# template if local development requires one:
cat > .env.example << 'ENVFILE'
APPFOLIO_CLIENT_ID=
APPFOLIO_CLIENT_SECRET=
APPFOLIO_BASE_URL=
ENVFILE

# .env remains ignored; populate it only through an approved local secret flow.

Step 2: Create API Client

// src/appfolio-client.ts
import axios, { AxiosInstance } from 'axios';

class AppFolioClient {
  private api: AxiosInstance;

  constructor() {
    this.api = axios.create({
      baseURL: process.env.APPFOLIO_BASE_URL,
      auth: {
        username: process.env.APPFOLIO_CLIENT_ID!,
        password: process.env.APPFOLIO_CLIENT_SECRET!,
      },
      headers: { 'Content-Type': 'application/json' },
      timeout: 30000,
    });
  }

  async verifyConnection(): Promise<boolean> {
    try {
      const response = await this.api.get('/properties');
      console.log(`Connected! Found ${response.data.length} properties`);
      return true;
    } catch (error: any) {
      console.error(`Connection failed: ${error.response?.status} ${error.message}`);
      return false;
    }
  }

  get http(): AxiosInstance { return this.api; }
}

export { AppFolioClient };

Step 3: Verify Connection

# Quick, redacted diagnostic without putting Basic Auth in argv.
NETRC_FILE="$(mktemp)"
trap 'rm -f "$NETRC_FILE"' EXIT
chmod 600 "$NETRC_FILE"
APPFOLIO_HOST="${APPFOLIO_BASE_URL#https://}"
APPFOLIO_HOST="${APPFOLIO_HOST%%/*}"
printf 'machine %s login %s password %s\n' "$APPFOLIO_HOST" \
  "$APPFOLIO_CLIENT_ID" "$APPFOLIO_CLIENT_SECRET" > "$NETRC_FILE"
curl -s -o /dev/null -w '%{http_code}\n' --netrc-file "$NETRC_FILE" \
  "${APPFOLIO_BASE_URL}/properties"

API Endpoints

ResourceEndpointMethods
Properties/api/v1/propertiesGET
Units/api/v1/unitsGET
Tenants/api/v1/tenantsGET
Leases/api/v1/leasesGET, POST
Bills/api/v1/billsGET, POST
Vendors/api/v1/vendorsGET
Owners/api/v1/ownersGET
Reports/api/v1/reportsGET

Output

  • Provider-issued credentials injected through the approved secret boundary
  • TypeScript REST client with Basic Auth
  • Redacted connectivity result for the approved safe-read endpoint

Examples

For a first authentication rehearsal, inject a sandbox credential and the provider-issued base URL through the local secret mechanism, then make one read-only request to an approved synthetic property page. Record only the status code and client configuration verdict; do not print a property payload, client ID, secret, or full host/path in shared logs. If the contract, base URL, secret binding, or status result is unverified, stop before any write workflow and have the credential owner correct the configuration.

Error Handling

ErrorCauseSolution
401 UnauthorizedInvalid credentialsVerify client_id/secret from AppFolio
403 ForbiddenNot a Stack partnerComplete partner application
404 Not FoundWrong base URLUse your-company.appfolio.com format
TimeoutNetwork issueCheck firewall allows HTTPS to appfolio.com

Resources

Next Steps

Proceed to appfolio-hello-world for your first property query.

发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.24

发布时间

Sep 24, 2026

分类

未分类

许可证

MIT

源路径

skills/.curated/appfolio-install-auth

默认分支

main

最新提交

e5a6c3b

Tree SHA

c2dc8e8