Provider tokens Solo plan
How to create the least-privilege token for each provider you can connect: Stripe, AWS and Polar.
Create each token so it can only read. StackHangar refuses a token that can do more, and doesn't keep it. The same steps appear on the Add a connection form when you choose the provider. See Connections.
#Stripe
StackHangar reads daily revenue, refunds and fees.
- In the Stripe Dashboard, go to Developers, then API keys.
- Choose Create restricted key and name it StackHangar.
- Set Balance to Read. Leave every other resource on None.
- Don't tick Write on anything.
- Create the key and copy it. It starts with
rk_live_. Paste it into the connection form.
If you don't see a Balance row, look for the permission balance_read. A secret key that starts with sk_ is refused.
#AWS
StackHangar reads daily cost by tag or linked account.
- In the AWS IAM console, create a user. Don't turn on console access.
- Don't attach any group or managed policy to the user.
- Add an inline policy that allows only the action
ce:GetCostAndUsage. - Create one access key for the user and copy the key ID and the secret. Paste both, separated by a colon.
Each request costs you $0.01 at AWS. StackHangar reads once a day.
Note
We haven't yet confirmed that this action alone is enough. If the first read fails with a permission error, tell us.
#Polar
StackHangar reads daily revenue for your organization.
- In Polar, open Settings, then Access Tokens, for the organization that sells your product.
- Create an organization access token and set an expiration date.
- Tick only
metrics:read. Leave every other permission unticked. - Copy the token once and paste it into the connection form.
Use an organization token, not a personal one. If you don't see metrics:read as a checkbox, the label may differ. Choose the option for reading metrics only.
#Replacing a token
To replace a token, see Rotate a connection's token on the Connections page.
Something missing or wrong on this page? Tell us.