Skip to content

ActivityFields Does Not Have V2 for API, only V1 and Pipedrive-connect is attempting to use V2 #40

@davidplappert

Description

@davidplappert

If you attempt to create an activity, you get a nasty error message.
bundle/ruby/3.3.0/gems/json-2.11.3/lib/json/common.rb:336:in `parse': unexpected character: '<!DOCTYPE html> (JSON::ParserError) <html trans'

This is because the ActivityFields endpoint is only on V1 of the API:
https://developers.pipedrive.com/docs/api/v1/ActivityFields#getActivityFields

However, pipedrive-connect is attempting to access V2 when doing
Pipedrive::Activity.create()

This shows in logs:
I, [2025-05-06T23:21:37.737262 #5076] INFO -- : request: GET https://api.pipedrive.com/api/v2/activityFields?api_token=xxx&start=0

You can validate this also by running:
Pipedrive::Activity.fields

The fix would be using replacing v2 with v1 for just this endpoint.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions