I’m trying to realize a connection with the Pipedrive API,
for which I generated a Java-client using the swagger-codegen-maven-plugin on the OpenApi yaml specification (after I cleaned it up a little).
However, when I now try to create a person or organization from that client, I do get the error response “Disallowed Key Characters” (just like reported in Response: Disallowed Key Characters)
However, in my case, the content-type parameter was set to JSON (application/json to be exact).
To show some more details, I attached a screenshot of the debugger window.
I can perform searches, so my authentication works apparently.
Could you give me any clue on what could be wrong here?
However, it is interesting that the request fails with the JSON content type. If possible, can you share the logs & correlation ID in the API response ?
Hello @Hem,
Sure, I just performed another test a few minutes ago… using content-type multipart/form-data (it turns out to work too).
The test was succesful, in the response headers I found:
x-correlation-id: a12881b6-c1a7-4764-891a-b4085630cb57
For the sake of completeness, I’ll do another test with application/json content-type…
And indeed, it fails again.
The correlation-id is now: 906dae56-1ec3-4437-bbf5-18e44fd1fbdd
The error-message returned is: Illegal key in payload!
I’m not sure where to find the logs…
Hope to hear from you soon!
That is interesting. The illegal key in payload hints that something is off when the payload is constructed. Can you share the payload structure before it is sent? (The JSON representation of it)
Sure, how about this one!?
{“name”:“BillingHouse”,“visible_to”:“3”,"":“AddOrganizationRequest”}
Ahh yes, and when I don’t quote the 3 like this:
{“name”:“BillingHouse”,“visible_to”:3,"":“AddOrganizationRequest”},the request fails too, but with message
Disallowed Key Characters.