{'status': 'error', 'message': 'This oauth-token (CMD<...>WgA) does not have proper permissions! (requires all of [developers-read])', 'correlationId': '53ca5c88-9adf-4cff-b6a2-6feb39bb89a6'}
First of all, this response is not helpful at all as there is no such thing as a developers-read scope. Second, and much more important, how do I get this to work?
Hi there, it looks like you are using a Bearer Token (App Access Token) to authenticate the request. The Access Token is unique to your custom app and to the live portal where the app is installed and it can only be used to push and fetch information from that CRM portal.
However, the timeline events are not stored in a CRM portal they are stored in your Developer portal. This means that the reuqest cannot be authenticated using an access token. Instead you will need to use something called "Developer API Key" found in your Developer Portal. Here is an article explaining where to locate this key: https://legacydocs.hubspot.com/docs/faq/developer-api-keys
Do note that your Developer API Key is different than the Hapi Key.
as developer api keys are no longer a thing, I've tried different things in place of HUBSPOT_ACCESS_TOKEN. Mainly, the access token of a privateapp which is what the documentation says to use to replace developer api keys, and, the token that is return when I run the oauth flow for the connected app.
Neither access tokens work, they both return this developer error.
I can access contacts and companies just fine using just the private app key, but timeline events just doesn't seem to work.
I have also validated that this same error arises when using the official hubspot-python-api package. See the code below:
# via hubspot provided api client (from hubspot.crm.timeline import ApiClient) api_client = ApiClient(header_name="Authorization", header_value=f"Bearer {my_bearer_token}") # from hubspot.crm.timeline.api.templates_api import TemplatesApi template_api = TemplatesApi(api_client) all_timeline_templates = template_api.get_all(app_id=int(SENDGRID_SYNC_APP_ID))
Additionally, I have verified that I am using a super-set of permission of another app which uses/creates timeline events in contacts called MailSyncApp (https://mailsyncapp.io/). Their install URL is:
Hi there, it looks like you are using a Bearer Token (App Access Token) to authenticate the request. The Access Token is unique to your custom app and to the live portal where the app is installed and it can only be used to push and fetch information from that CRM portal.
However, the timeline events are not stored in a CRM portal they are stored in your Developer portal. This means that the reuqest cannot be authenticated using an access token. Instead you will need to use something called "Developer API Key" found in your Developer Portal. Here is an article explaining where to locate this key: https://legacydocs.hubspot.com/docs/faq/developer-api-keys
Do note that your Developer API Key is different than the Hapi Key.