docs/self-hosting/guides/appstore-and-integration/syncing-third-party-apps.mdx
</Step>
<Step title="Sending credentials to your cal.com instance">
When a user adds a 3rd party app on your platform, you should send the credentials that are created to your instance of [Cal.com](http://Cal.com) to `${CALCOM_WEBAPP_URL}/api/webhook/app-credential` . The payload should contain the following
```javascript
{
// UserId of the Cal.com user
userId: number;
// The app slug that is on Cal.com.
// Can be found in the Cal.com database in the App table
appSlug: string;
// The credentials from the 3rd party app. (ex. Access token, refresh token).
// Ideally it should contain the access token and expiry date
// AES256 encrypted with CALCOM_APP_CREDENTIAL_ENCRYPTION_KEY
keys: string;
}
```
</Step>
<Step title="Refreshing credentials">
When [Cal.com](https://Cal.com) needs to refresh the app credentials it will make a request to `CALCOM_CREDENTIAL_SYNC_ENDPOINT`. The request contains the following.
```javascript
{
calcomUserId: string;
// App slug on Cal.com
appSlug: string;
}
```
</Step>