简体   繁体   English

linkedin connect API给出错误401 - iphone

[英]linkedin connect API gives error 401 - iphone

hi i am sending connect invitation by email using linkedin iphone api 嗨,我正在使用linkedin iphone api通过电子邮件发送连接邀请

Request xml: 请求xml:

<?xml version='1.0' encoding='UTF-8'?>
    <mailbox-item>
        <recipients>
            <recipient>
                <person path="/people/email=%@">
                    <first-name>%@</first-name>
                    <last-name>%@</last-name>
                </person>
            </recipient>
        </recipients>
        <subject>Invitation to Connect</subject>
        <body>Please join my professional network on LinkedIn.</body>
        <item-content>
            <invitation-request>
                <connect-type>friend</connect-type>
            </invitation-request>
        </item-content>
    </mailbox-item>

where %@ indicates dynamic value. 其中%@表示动态值。 Content Type: text/xml Request Method: POST 内容类型:text / xml请求方法:POST

Response xml : 响应xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <error>
        <status>401</status>
        <timestamp>1342092385484</timestamp>
        <request-id>FX9SK3ZVG9</request-id>
        <error-code>0</error-code>
        <message>[unauthorized]. OAU:076lb67kcfe2|dc01dc46-4d78-44d2-9f9b-49053b8094db|*01|*01:1342092534:iZ/mDlOL7eo4fGv2O/rQZKe8oCA=</message>
    </error>

Also verified that authorization header is proper. 还验证了授权标头是否正确。 I have also debugged with oAuth debug console, i have enter same values in debug console, but signature key are different. 我也使用oAuth调试控制台进行了调试,我在调试控制台中输入了相同的值,但签名密钥不同。

So is it a problem with signature key ?? 这是签名密钥的问题吗? I have also gone through forums. 我也经历过论坛。 But still i am not able to find an exact problem. 但我仍然无法找到确切的问题。

Any help will be appreciated. 任何帮助将不胜感激。

Thanks 谢谢

There's a sample LinkedIn iPhone client on github here: https://github.com/synedra/LinkedIn-OAuth-Sample-Client github上有一个示例LinkedIn iPhone客户端: https//github.com/synedra/LinkedIn-OAuth-Sample-Client

You should be able to use that to see what the proper headers look like. 您应该能够使用它来查看正确的标题是什么样的。 As you're on a macintosh (or wouldn't be developing for the iPhone), I strongly encourage you to use HTTPScoop to watch the traffic when using the simulator and see what the differences are between what your application is doing and what the sample client does. 当您使用macintosh(或者不会为iPhone开发)时,我强烈建议您在使用模拟器时使用HTTPScoop来查看流量,并了解应用程序正在执行的操作与样本之间的差异客户呢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM