Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3647

LinkedIn API 400 bad request

$
0
0

I am trying to add an 'ad account user'(documentation)

I've tried the request as below, and with with URN. Both give me the error: compound key parameter value is invalid:

curl --request PUT \   --url https://api.linkedin.com/rest/adAccountUsers/account=123456789&user=ABCABCABCAB \   --header 'Authorization: Bearer xxxxx' \   --header 'Content-Type: application/json' \   --header 'LinkedIn-Version: 202501' \   --data '{    "account": "urn:li:sponsoredAccount:123456789",     "role": "ACCOUNT_MANAGER",  "user": "urn:li:person:ABCABCABCAB" }'

When I try adding the header X-Restli-Protocol-Version: 2.0.0, the error changes to: ILLEGAL ARGUMENT: Syntax exception in path variables.

I have tried copying the sample request and just changing the URN/id's of the sponsoredAccount and person but that still gives the same result.

What can I do to fix this?


Viewing all articles
Browse latest Browse all 3647

Trending Articles