# CRM Cards - API calls

**URL:** <https://community.hubspot.com/t/crm-cards-api-calls/67189>\
**Category:** APIs & Integrations\
**Tags:** enterprise\
**Created:** [October 14, 2022, 7:22pm UTC](https://community.hubspot.com/t/crm-cards-api-calls/67189 "2022-10-14T19:22:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![PAtlan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/patlan/32/42298_2.png) [@PAtlan](https://community.hubspot.com/u/PAtlan)\
**Post date:** [October 15, 2022, 8:17am UTC](https://community.hubspot.com/t/crm-cards-api-calls/67189/2 "2022-10-15T08:17:09Z")

</div>

I’ll reply to my own post for future reference, as further digging allowed me to find how to set up API calls inside a card: the process is described in the docs,

`https://app-eu1.hubspot.com/docs/{hubspot instance}/doc/platform/serverless-functions `

(obviously replace with your instance number)

It seems each project saves its token in variable PRIVATE\_APP\_ACCESS\_TOKEN

so instanciating a hubspot Client like this:

`const hubspotClient = new hubspot.Client({accessToken: context.secrets.PRIVATE_APP_ACCESS_TOKEN,});`

works perfectly well!

---

_[View the full topic](https://community.hubspot.com/t/crm-cards-api-calls/67189)._
