Reputation: 33
I am using jquery translate which uses Google translate to provide the service. I am actually paying for the translation service. However, some websites just grabbed my API key (including code) and used it. In the end, I have to pay for them. Thus, I am wondering if there is a way to hide the key.
code:
<script language="javascript">
$.translate.load("API key");
$(document).ready(function(){
$("#submit").click(function() {
$.translate('text', 'en','es', {
complete: function(translation){
}
});
})
Upvotes: 3
Views: 2131
Reputation: 2286
Per Google's API Guide:
You can specify which domains are allowed to use your API key by clicking the Edit allowed referers link in the Simple API Access section of the API Access pane in the APIs Console.
Go to the API Console and modify accordingly.
Upvotes: 4