I am building a contract that uses oraclize to query an API. The API only accepts GET requests (no POST) and also has authentication that requires an API key to be sent as an argument(query_token) in the query string.

Is there any way to use oraclize_query and encrypt only the API key leaving the base part of the url (such as https://testingfire.com/transaction/15) exposed?

1 Answer 1


I spoke to Oraclize support and managed to figure it out.

For partially encrypted queries, I need to use "nested" as the base datasource. Then the key I encrypted using the python2 script from this repo, is processed using the "decrypt" datasource, which is nested in a "URL" datasource.

Here's a link showing the complete query: Link

  • thanks for sharing the link. Oraclize has added elaborating on partial encryption in its datasource. If you could edit your answer and add that one needs to use the nested datasource type, alongside the encrypt/decrypt datasource and whichever other core datasource they are using, so I don't post any duplicate answers and you already provided a proper link :).
    – DenisM
    May 29, 2018 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.