REST API - Impersonate Japanese Username

REST API - Impersonate Japanese Username

  • Hello,

    I'm importing threads, replies, wikis and Gallery posts into Telligent via the REST API using impersonation. However, some Japanese usernames return 

    HTTP/1.1 403 Impersonating user not found

    I thinks this is down to the encoding used in the HTTP headers, but I'm not sure I can change that.

    For example importing a reply for user "たろサ" has the following http headers:

    POST http:// .... /api.ashx/v2/forums/threads/13/replies.xml HTTP/1.1

    Rest-User-Token: YnB5aXljMGNjOXdvejNvZDRxZHMxZDphZG1pbg==

    Rest-Impersonate-User: _??

    Content-Type: application/x-www-form-urlencoded

    Host: renesas-dev

    Content-Length: 2356

    Expect: 100-continue

    Connection: Keep-Alive

    Any idea how I do this?


    Thanks,

    Fran

  • Check this article

    www.motobit.com/.../pa97.htm

  • Thank you.

    Unfortunately, the charset header is to tell the browser the encoding of a document in transfer. The japanese characters causing me problems are in one of the Http headers.

    Is there any alternative way to impersonate a user?

    Thanks,

    Fran

  • See: stackoverflow.com/.../sending-utf-8-values-in-http-headers-results-in-mojibake

    No, there is currently no other way to impersonate a user via REST other than to use the username and a REST API Key of that user.

  • Dan,

    I doubt it will help me in time for this project, but if there was someway to encode the username before adding it to the http header this would avoid the problem.

    Thanks for your help

    Fran