App API
Member tokens
Give your app a token that works for one member for 15 minutes, so it can read that member's balance and wallet without ever holding your secret key.
Available at launch
Your server creates the token after the guest signs in with your own login, then hands it to the app. The app sends it as Authorization: Bearer mt_.... There is no refresh token: when a call returns 401 token_expired, the app asks your server for a new one. The Authentication guide walks through the full flow. Every endpoint can also return the common errors listed on Errors.
What a member token can call#
A member token acts for one member only. Anything that moves money or points directly, or reads other members, needs your secret key on your server.
| Endpoint | Member token | Notes |
|---|---|---|
GET /v1/program | Yes | |
GET /v1/locations | Yes | |
GET /v1/rewards, GET /v1/rewards/{id} | Yes | |
GET, PATCH, DELETE /v1/members/me | Yes | Can't change phone. Can set birthday once. |
GET /v1/members/me/activity | Yes | |
GET /v1/members/me/wallet | Yes | |
GET, PATCH /v1/members/me/communication_preferences | Yes | |
Devices and messages under /v1/members/me/... | Yes | See Devices and messages. |
POST /v1/checkouts/preview | Yes | For the token's own member only. |
POST /v1/redemptions | Yes | For the token's own member only. |
GET /v1/redemptions/{id}, POST /v1/redemptions/{id}/cancel | Yes | Only redemptions of the token's own member. Lets the app release a hold when the guest leaves checkout. |
POST /v1/app_events | Yes | |
POST /v1/members, GET /v1/members | No | Create and look up members from your server. |
Anything under /v1/members/{id}/... | No | Includes other members and points adjustments. |
POST /v1/orders, refunds, GET /v1/orders | No | Only your server knows an order was paid. |
POST /v1/member_tokens | No | |
| Webhook endpoints and events | No |
A token used on an endpoint it can't call gets 403 missing_scope.
Coming soon unPLUG-hosted sign-in for brands without their own login: phone number and SMS code on an unPLUG page, returning a member token and a refresh token. See the Authentication guide.