Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing documentation to fetch / create templates & events and their APIs are not authenticated #306

Open
matdrapeau opened this issue Apr 23, 2024 · 0 comments

Comments

@matdrapeau
Copy link

matdrapeau commented Apr 23, 2024

templates_api and events_api seems not being authenticated the same way as other crm APIs.

from hubspot import HubSpot
app_id = '44004400'
api_client = HubSpot(access_token='MY_ACCESS_TOKEN')

custom_event_definition = {
  "label": "Viewed Car",
  "name": "viewed_car",
  "description": "An event that fires when visitor views a car listing in the online inventory",
  "primaryObject": "CONTACT",
  "propertyDefinitions": [
    {
      "name": "condition",
      "label": "Condition",
      "type": "enumeration",
      "options": [
        {
          "label": "New",
          "value": "new"
        },
        {
          "label": "Used",
          "value": "used"
        }
      ]
    }]
}

api_client.crm.timeline.templates_api.create(app_id, custom_event_definition)

It looks like the api is not authenticated, but when using the api_client.crm.contacts by example, it does work.

@matdrapeau matdrapeau changed the title Missing documentation to fetch / create templates & events. Missing documentation to fetch / create templates & events and their APIs are not authenticated Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant