Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Ridiculously complex API access: Bing Translator

Ridiculously complex API access: Bing Translator

Scheduled Pinned Locked Moved The Lounge
htmlcomcloudsalestools
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dario Solera
    wrote on last edited by
    #1

    So we'd like to offer Bing Translator support in our application, very much like we already support Google Translate: the customer is responsible for obtaining the API key from Google and pay for the service, then we just use the key to fetch translations. Obviously, with Bing Translator the matter gets more complex. Let's have a look at Google Translate API: 1. you sign up for API access and enter CC details at Google API Console 2. you get a nice API key to use in all HTTP requests to the API, without the need for any other info 3. you make POST requests to the API, including the key, and you're happy. Now let's compare it with Bing Translator API: 1. you sign up for API access at Azure Data Market (notice the seemingly unrelated name?) 2. you have to register the client application (that is the app using the API) - in this case the customer would have to register our application 3. you have to make a POST to an API to get an access token 4. you make POST requests to the API, including the access token 5. go back to 3, because the access token expires after 10 minutes. Why, oh why Microsoft always has to complicate things beyond all reasonable levels? Obviously, steps 3 and 4 are executed by our application on customer's behalf, but that is uselessly complex. Any additional step you require to use an API is just a potential source of problems and errors, and obviously of latency in this case.

    If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe, but not a personality. [Charlie Brooker] ScrewTurn Wiki, Software Localization Tools & Services and My Blog

    M G 2 Replies Last reply
    0
    • D Dario Solera

      So we'd like to offer Bing Translator support in our application, very much like we already support Google Translate: the customer is responsible for obtaining the API key from Google and pay for the service, then we just use the key to fetch translations. Obviously, with Bing Translator the matter gets more complex. Let's have a look at Google Translate API: 1. you sign up for API access and enter CC details at Google API Console 2. you get a nice API key to use in all HTTP requests to the API, without the need for any other info 3. you make POST requests to the API, including the key, and you're happy. Now let's compare it with Bing Translator API: 1. you sign up for API access at Azure Data Market (notice the seemingly unrelated name?) 2. you have to register the client application (that is the app using the API) - in this case the customer would have to register our application 3. you have to make a POST to an API to get an access token 4. you make POST requests to the API, including the access token 5. go back to 3, because the access token expires after 10 minutes. Why, oh why Microsoft always has to complicate things beyond all reasonable levels? Obviously, steps 3 and 4 are executed by our application on customer's behalf, but that is uselessly complex. Any additional step you require to use an API is just a potential source of problems and errors, and obviously of latency in this case.

      If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe, but not a personality. [Charlie Brooker] ScrewTurn Wiki, Software Localization Tools & Services and My Blog

      M Offline
      M Offline
      Mark_Wallace
      wrote on last edited by
      #2

      Fixed (with Google translate) Così ci piacerebbe offrire un sostegno Translator Bing nella nostra applicazione, molto simile a noi già supporta Google Translate: il cliente è responsabile per ottenere la chiave API di Google e pagare per il servizio, allora basta usare la chiave per recuperare le traduzioni. Ovviamente, con Translator Bing la questione diventa più complessa. Diamo uno sguardo a Google Translate API: 1. ti iscrivi per l'accesso API e inserire i dettagli CC a Google API Console 2. si ottiene una chiave API piacevole da utilizzare in tutte le richieste HTTP al API, senza la necessità di qualsiasi altra informazione 3. di effettuare le richieste POST alle API, tra cui la chiave, e sei felice. Ora si confronta con Bing Translator API: 1. ti iscrivi per l'accesso al mercato di API Azure dati (si noti il nome apparentemente non correlati?) 2. è necessario registrare l'applicazione client (che è l'applicazione utilizzando l'API) - in questo caso il cliente avrebbe dovuto registrare la nostra applicazione 3. dovete fare un post ad un API per ottenere un token di accesso 4. fate richieste POST per l'API, tra cui il token di accesso 5. torna a 3, in quanto il token di accesso scade dopo 10 minuti. Perché, oh perché Microsoft deve sempre complicare le cose al di là di tutti i livelli ragionevoli? Ovviamente, i punti 3 e 4 sono eseguiti dalla nostra applicazione per conto del cliente, ma che è inutilmente complesso. Ogni ulteriore passaggio si richiede l'utilizzo di un API è solo una potenziale fonte di problemi ed errori, e ovviamente della latenza in questo caso.

      I am happy to say that I speak better Italian than Google

      C 1 Reply Last reply
      0
      • M Mark_Wallace

        Fixed (with Google translate) Così ci piacerebbe offrire un sostegno Translator Bing nella nostra applicazione, molto simile a noi già supporta Google Translate: il cliente è responsabile per ottenere la chiave API di Google e pagare per il servizio, allora basta usare la chiave per recuperare le traduzioni. Ovviamente, con Translator Bing la questione diventa più complessa. Diamo uno sguardo a Google Translate API: 1. ti iscrivi per l'accesso API e inserire i dettagli CC a Google API Console 2. si ottiene una chiave API piacevole da utilizzare in tutte le richieste HTTP al API, senza la necessità di qualsiasi altra informazione 3. di effettuare le richieste POST alle API, tra cui la chiave, e sei felice. Ora si confronta con Bing Translator API: 1. ti iscrivi per l'accesso al mercato di API Azure dati (si noti il nome apparentemente non correlati?) 2. è necessario registrare l'applicazione client (che è l'applicazione utilizzando l'API) - in questo caso il cliente avrebbe dovuto registrare la nostra applicazione 3. dovete fare un post ad un API per ottenere un token di accesso 4. fate richieste POST per l'API, tra cui il token di accesso 5. torna a 3, in quanto il token di accesso scade dopo 10 minuti. Perché, oh perché Microsoft deve sempre complicare le cose al di là di tutti i livelli ragionevoli? Ovviamente, i punti 3 e 4 sono eseguiti dalla nostra applicazione per conto del cliente, ma che è inutilmente complesso. Ogni ulteriore passaggio si richiede l'utilizzo di un API è solo una potenziale fonte di problemi ed errori, e ovviamente della latenza in questo caso.

        I am happy to say that I speak better Italian than Google

        C Offline
        C Offline
        Chris Meech
        wrote on last edited by
        #3

        Nagy will want Hungarian. Not the notation, the language. :)

        Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

        1 Reply Last reply
        0
        • D Dario Solera

          So we'd like to offer Bing Translator support in our application, very much like we already support Google Translate: the customer is responsible for obtaining the API key from Google and pay for the service, then we just use the key to fetch translations. Obviously, with Bing Translator the matter gets more complex. Let's have a look at Google Translate API: 1. you sign up for API access and enter CC details at Google API Console 2. you get a nice API key to use in all HTTP requests to the API, without the need for any other info 3. you make POST requests to the API, including the key, and you're happy. Now let's compare it with Bing Translator API: 1. you sign up for API access at Azure Data Market (notice the seemingly unrelated name?) 2. you have to register the client application (that is the app using the API) - in this case the customer would have to register our application 3. you have to make a POST to an API to get an access token 4. you make POST requests to the API, including the access token 5. go back to 3, because the access token expires after 10 minutes. Why, oh why Microsoft always has to complicate things beyond all reasonable levels? Obviously, steps 3 and 4 are executed by our application on customer's behalf, but that is uselessly complex. Any additional step you require to use an API is just a potential source of problems and errors, and obviously of latency in this case.

          If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe, but not a personality. [Charlie Brooker] ScrewTurn Wiki, Software Localization Tools & Services and My Blog

          G Offline
          G Offline
          Garth J Lancaster
          wrote on last edited by
          #4

          ugh !!! I understand your pain, although your post proved helpful on 2 counts Dario 1) NEVER USE BING Translate API ! 2) I wondered what the model was for using these API's that require keys -

          Dario Solera wrote:

          the customer is responsible for obtaining the API key from Google and pay for the service

          ... cool - so your (company) key is just used for dev. I presume there is some config/setup step when they install your application that allows them to input their key mille grazie ! ciao 'g'

          D 1 Reply Last reply
          0
          • G Garth J Lancaster

            ugh !!! I understand your pain, although your post proved helpful on 2 counts Dario 1) NEVER USE BING Translate API ! 2) I wondered what the model was for using these API's that require keys -

            Dario Solera wrote:

            the customer is responsible for obtaining the API key from Google and pay for the service

            ... cool - so your (company) key is just used for dev. I presume there is some config/setup step when they install your application that allows them to input their key mille grazie ! ciao 'g'

            D Offline
            D Offline
            Dario Solera
            wrote on last edited by
            #5

            Yes the customer inserts the API key into our app's configuration. The problem is that with Bing there is no "key" but multiple strings/IDs/whatever.

            If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe, but not a personality. [Charlie Brooker] ScrewTurn Wiki, Software Localization Tools & Services and My Blog

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups