feat(hubspot): Implement verify credentials for OAuth

This commit is contained in:
Faruk AYDIN
2023-09-08 19:35:20 +02:00
parent b12f39916f
commit dd1e8240b8
8 changed files with 110 additions and 29 deletions

View File

@@ -0,0 +1,11 @@
import { IGlobalVariable, IJSONObject } from '@automatisch/types';
const getAccessTokenInfo = async ($: IGlobalVariable): Promise<IJSONObject> => {
const response = await $.http.get(
`/oauth/v1/access-tokens/${$.auth.data.accessToken}`
);
return response.data;
};
export default getAccessTokenInfo;

View File

@@ -0,0 +1,3 @@
const scopes = ['crm.objects.contacts.read', 'crm.objects.contacts.write'];
export default scopes;