# PCA Connect

> **Not a developer?**
>
> This section is for software developers building apps that connect to
> Precision Cut Archery. If you're an archer, you don't need anything
> here.
>
> To see or disconnect apps you've connected, open **Account → Connected
> Apps** in your account settings.
> For everything else, see [the main docs](/documentation/) or email
> [support@precisioncutarchery.com](mailto:support@precisioncutarchery.com).

**The most trusted ballistics engine in archery, in your app.** PCA Connect
gives your app the engine behind our sight tapes: your app sends a build and
the shooting conditions, and gets back our results to show under the
Precision Cut Archery name. Registering your app is free, in the [developer
portal](/app/developers/), and we don't charge it for calls. Each user
brings their own subscription, and so does each of your test accounts.

Users sign in and approve your app on our site. Your app gets a scoped
token and a per-app user identifier, never a password, an email address or
saved setups. The one thing it learns about the account is whether its
subscription is active.

## Glossary

- **Sign-in:** one approval of your app, usually on one device, and the
  tokens it issues: its code, access tokens and refresh tokens. It isn't
  the user signing in to Precision Cut Archery, which they do on our
  site before they approve. A user can hold [several
  sign-ins](/documentation/developers/tokens/#several-devices) with your
  app at once.
- **Connection:** your app's access to one user's account: all their
  live sign-ins with it. The user sees it as your app in **Connected
  Apps**.
- **Disconnect:** end a connection, every sign-in at once. The user
  does it in Connected Apps; we do it in the cases
  [Revocation](/documentation/developers/revocation/) lists.
- **Revoke:** end one token at `/oauth/revoke`. Revoking a refresh token
  ends its sign-in; revoking an access token ends only that token.
- **Suspended:** an app we've paused. Its tokens stop working, every
  connection to it ends, and an authorization request shows our error
  page ([Review and going live](/documentation/developers/getting-access/#review-and-going-live)).

## How it works

Connect is OAuth 2.0, authorization code with PKCE.

1. You [register your app](/documentation/developers/getting-access/) in
   the [developer portal](/app/developers/) and get a `client_id`. To
   test, you need a subscribed Precision Cut Archery account on your
   app's list of test accounts.
2. A user signs in on our site and approves your app on our consent
   screen, each time your app sends them to connect, on each device.
3. Your app gets a token for the scopes the user approved, and an
   identifier for that user that is unique to your app.
4. Your app sends a build (arrow mass, launch speed and PCA Drag Index™)
   and the conditions, in SI units, and we return the result.

A user whose subscription lapses has to renew before we serve them
again; the [subscription check](/documentation/developers/calling-the-api/#subscription-check)
tells your app whether a user's is active. A user can disconnect your app
at any time from their account.

## What's available

| Scope | What it computes | For example |
|---|---|---|
| `compute:build` | Launch speed estimate and spine recommendation for a bow and arrow | Comparing arrow builds side by side |
| `compute:analyze` | Trajectory, wind drift, impact, range forgiveness, sight clearance | Drop and wind tables for a hunting app; forgiveness graphs for coaching; impact energy and momentum for broadhead questions |
| `compute:air` | Air density from readings where the shot is taken, a weather report, or a density altitude | Adjusting every other result for local conditions |

There are nine routes: eight `POST` compute routes under
`/api/v1/compute/` (`build/launch-speed`, `build/spine-recommendation`,
`analyze/trajectory`, `analyze/range-forgiveness`, `analyze/wind-drift`,
`analyze/impact`, `analyze/sight-clearance`, `air/density`) and
`GET /api/v1/connect/subscription`, which needs no scope. See [Ballistics
concepts](/documentation/developers/concepts/) for what they do and the
[OpenAPI
document](/documentation/developers/calling-the-api/#openapi-document) for
their shapes.

## What isn't available

Connect runs the ballistics for a build your app already knows. It does
not give your app access to a user's:

- Setups: their saved bows, arrows, sight-ins, sight tape settings, or the
  sight catalog
- Sight tapes, sight marks, shoot-for calculations, fixed pins, or cut
  charts
- Drag calibration, which turns a sight-in into an arrow model

Those stay inside our apps. If your app needs a build's numbers, the
user enters them, or your app estimates launch speed from the bow's specs
with `compute:build`.

## The rules

The PCA Connect [Developer Agreement](/developer-agreement/), which you
accept in the portal when you register, says what your app may do and
governs where these docs differ; these docs say how to build it. Start with
[Brand and Attribution](/documentation/developers/brand/). Connect isn't for
scraping our data or building sight tapes from our numbers
([prohibited uses](/developer-agreement/#prohibited-uses)), and its users
are 18 or older ([Section 17](/developer-agreement/#representations)).

## Contacts

- **Help:** an integration question, a lapsed test account, a rate
  increase, anything else the portal doesn't cover:
  [support@precisioncutarchery.com](mailto:support@precisioncutarchery.com).
- **Security:**
  [security@precisioncutarchery.com](mailto:security@precisioncutarchery.com),
  within 24 hours of a security incident
  ([Developer Agreement](/developer-agreement/#security)).
- **Legal notices:**
  [legal@precisioncutarchery.com](mailto:legal@precisioncutarchery.com).

There's no status page yet: we email incidents to your app's contact
address.
