Breaking News
Home / iOS / iOS Isuses / LinkedIn Error : Using People Tag instead of Person in Messaging API

LinkedIn Error : Using People Tag instead of Person in Messaging API

Issue

11-05-3018:54:11.529 App[35090:207] <0x6548d70 LinkedInService.m:(104)> post data <?xml version=”1.0″?>
<mailbox-item><recipients><recipient><people path=”/people/4jBYb-gd-d”/></recipient></recipients><subject>Test Message</subject><body>Test</body></mailbox-item>
2011-05-3018:54:11.529 App[35090:207] <0x34fe6c OAuthViewController.m:(210)> im : authForLinkedIn
2011-05-3018:54:11.531 App[35090:207] signing request: <NSMutableURLRequest http://api.linkedin.com/v1/people/~/mailbox>
2011-05-3018:54:11.532 App[35090:207] signing params: (
                                                                 “oauth_consumer_key=qa7OEDcdD1xbsNTu1xHUpVecp-wgGYRSwooSNgyLWTOYFcZ3f9Gcf8JTfiHA2maM”,
                                                                 “oauth_token=6f2bss6d4a-7c8a-4355-b50f-3e3e7e728f13”,
                                                                 “oauth_signature_method=HMAC-SHA1”,
                                                                 “oauth_version=1.0”,
                                                                 “oauth_nonce=10347610816915067335”,
                                                                 “oauth_timestamp=1306806851”
                                                                 )
2011-05-3018:54:11.533 App[35090:207] hashing: qI7YW6eZ9C06acVX0MUah_rtl1iEsCJTQ1RVkTx7b9UFg43she9NeAQIuLihkM0D&8ed5824c-1f51-4231-9312-e29f5f823e02
2011-05-3018:54:11.533 App[35090:207] base string: POST&http%3A%2F%2Fapi.linkedin.com%2Fv1%2Fpeople%2F~%2Fmailbox&oauth_consumer_key%3Dqa7OEDcdD1xbsNTu1xHUpVecp-wgGYRSwooSNgyLWTOYFcZ3f9Gcf8JTfiHA2maM%26oauth_nonce%3D10347610816915067335%26oauth_signature_method

%3DHMAC-SHA1%26oauth_timestamp%3D1306806851%26oauth_token%3D6f2b6d4a-7c8a-4355-b50f-3e3e7e728f13%26oauth_version%3D1.0
2011-05-3018:54:11.534 App[35090:207] signature: wUg6muHeyYUsqcB3FSyi8q7uZwM=
2011-05-3018:54:11.535 App[35090:207] adding auth header: OAuth oauth_consumer_key=”qa7OEDcdD1xbsNTu1xHUpVecp-wgGYRSwooSNgyLWTOYFcZ3f9Gcf8JTfiHA2maM”, oauth_token=”6f2b6d4a-7c8a-4355-b50f-3e3e7e728f13″, oauth_signature_method=”HMAC-SHA1″, oauth_version=”1.0″, oauth_nonce=”10347610816915067335″, oauth_timestamp=”1306806851″, oauth_signature=”wUg6muHeyYUsqcB3FSyi8q7uZwM%3D”
2011-05-3018:54:11.535 App[35090:207] final request: <NSMutableURLRequest http://api.linkedin.com/v1/people/~/mailbox>
2011-05-3018:54:11.650 App[35090:207] <0x6548d70 LinkedInService.m:(137)> API response: <?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
<error>
<status>400</status>
<timestamp>1306806851593</timestamp>
<error-code>0</error-code>
<message>Invalid xml {Expected element ‘person@http://api.linkedin.com/v1’ instead of ‘people@http://api.linkedin.com/v1’ here in element recipient@http://api.linkedin.com/v1, Expected element ‘person@http://api.linkedin.com/v1’ before the end of the content in element recipient@http://api.linkedin.com/v1}</message>
    </error>

Resolution

One close examination the request xml is not correct. It should use people tag and not the person tag. It’s a very common error as people and person tag gets switched.

It correct should be.

<?xml version=”1.0″?>
<mailbox-item><recipients><recipient><people

path=”/people/4jBYb-gd-d”/></recipient></recipients><subject>Test

Message</subject><body>Test</body></mailbox-item>

[pb_builder]

Check Also

Signing Identities, Missing Private Key, Cannot sign App

Issue Cannot sign the App in XCode, says Missing Private Key. <!

Advertisment ad adsense adlogger