I’m not sure but I could imagine that the API is missing some request header information that is set automatically when using curl, like User-Agent or Referer.
As concrete example why I’m thinking about that, please see the following post:
To see all header information, you could use the rawHeader element of type httpRawHeader_t, which is an element of the request and response header structure.
Some more infos about header and raw header you can find in this conversation:
But to see the whole http conversation, I would propose to use wireshark.