Unable to parse value for path parameter: id

Hi!

I am calling https://api.hubapi.com/email/public/v1/campaigns/by-id.

I get the first response successfully like:

Spoiler

{

"campaigns": \[

    {

        "id": 151231523,

        "appId": 113,

        "appName": "Batch"

    },

    {

        "id": 123454862,

        "appId": 113,

        "appName": "Batch"

    }

],

"hasMore": true,

"offset": "M5q2lei1s8"

}

I then use the offset key to call the next page using

https://api.hubapi.com/email/public/v1/campaigns/by-id&offset=M5q2lei1s8

Then I receive the error message:

{‘status’: ‘error’, ‘message’: ‘Unable to parse value for path parameter: id’, ‘correlationId’: ‘4d728a7e-9e3a-479b-92ef-4a6cff8d8bdb’}

This happens only when authenticating using OAuth.

If I use an API Key I have no problems.

Please help

Best regards,

Tobias

@TDahl1

Hi.

API document has not information about ‘offset’

https://legacydocs.hubspot.com/docs/methods/email/get_campaign_data

But your call ‘API parametor’ might be wrong.

( is ‘api key’ omit ?)

>https://api.hubapi.com/email/public/v1/campaigns/by-id&offset=M5q2lei1s8

=>https://api.hubapi.com/email/public/v1/campaigns/by-id?offset=M5q2lei1s8

by-id [&] offset=M5q2lei1s8

=> by-id [?] offset=M5q2lei1s8

thanks.

Hi skimura,

You are right. By changing & to ?, it works.

Thanks so much!! :slightly_smiling_face: