Amazon Translate

  1. 3 months ago

    James M

    Apr 15 Pre-Release Testers, Xojo Pro

    Has anyone tried and been able to access AWS Translate services?

    I have tried MonkeyBread's curl.SetupAWS() but am getting errors... I have also tried to grow my own class from scratch based on the Python example code provided by Amazon but have not been able to get the signature correct.

    (I am able to access AWS S3 services so I do have some clue about this stuff.)

    Any help is appreciated.

    Jim

    Answering my own question for the record.... I am finally able to use AWS Translate... I had to debug their PHP SDK to find some undocumented HTTP header and signature requirements.

    If anyone needs access to this service feel free to contact me.

  2. 2 months ago

    James M

    May 9 Pre-Release Testers, Xojo Pro Answer

    Answering my own question for the record.... I am finally able to use AWS Translate... I had to debug their PHP SDK to find some undocumented HTTP header and signature requirements.

    If anyone needs access to this service feel free to contact me.

  3. Tim P

    May 9 Pre-Release Testers, XDC Speakers

    @James M Answering my own question for the record.... I am finally able to use AWS Translate... I had to debug their PHP SDK to find some undocumented HTTP header and signature requirements.

    I'd be curious what you've done and/or which headers you're using as I had no issues with their documentation and authentication. I have 100% pure Xojo code classes for interacting with AWS that don't use plugins, shell, hacks, or workarounds.

  4. James M

    May 9 Pre-Release Testers, Xojo Pro

    Tim....

    My code is also 100% Xojo (except for the HTTP socket where I use MBS CURL... because Xojo HTTPS leak like a sieve.)

    Here is what I had to do to get it to work:

    "content_type: application/x-amz-json-1.1" // not 1.0 and it does not need to be part of the signed header.
    Add header "x-amz-target: AWSShineFrontendService_20170701.TranslateText" // this does need to be part of the signed header... and I did not find this documented... if you find it please let me know where.

    So my signed headers are "host;x-amz-date;x-amz-target"

    The entire list of headers is:
    Authorization
    Content-Type
    Host
    X-Amz-Date
    X-Amz-Target
    Content-Length

    My query string is empty and I put the entire json request in the socket payload.

    I did not have any problems accessing S3 like I did with Translate. If I had not looked at the Translate PHP SDK I still would not have it working.

  5. Bob K

    May 9 Pre-Release Testers, Xojo Pro Kansas City

    @James M Xojo HTTPS leak like a sieve.)

    Is the reported in Feedback? Feedback #?

  6. James M

    May 9 Pre-Release Testers, Xojo Pro

    @Bob K Is the reported in Feedback? Feedback #?

    Here it is 36565.... back from Nov 2014.... You may notice that is was marked "fixed" by Joe but later reopened.... I believe the fix created other problems.

  7. Bob K

    May 9 Pre-Release Testers, Xojo Pro Kansas City

    Have you tried xojo.net.httpsocket to see if it has similar leak? Or now that you're on CURL you it's just easier to stick with it?

  8. James M

    May 9 Pre-Release Testers, Xojo Pro

    @Bob K Have you tried xojo.net.httpsocket to see if it has similar leak? Or now that you're on CURL you it's just easier to stick with it?

    I gave up on mixing the old and new framework so did not even tried it.... and my current usage is often synchronous which the new framework does directly not support... it was much easier and more powerful to use MBS CURL... especially if you need to debug the connection.

or Sign Up to reply!