Is it possible to generate new api keys?


Is there a way to generate new api keys, i managed to put my server address as well as the read api key on a github commit so i really need to be able to change the api keys.

To make matters worse i’m still running my local emoncms (9.3 | 2015.12.30) installation on my intel nuc (windows).

I hope this can be done without having to recreate all my feeds / input processing / dashboards somehow

i have access to the database as well as all files, so if i have to something manually to make this work i’m fine with that just need a few instruction on how to do it

The apikeys are held in the “apikey_write” and “apikey_read” fields of the “users”, they ere not encrypted in any way to you can simply edit or replace the apikey without any other changes to your emoncms install, but you will obviously need to update all devices and software etc that were using the old key.

phpmyadmin is the easiest tool for the job unless you are an mySQL wizz.

you can manually create a key, use a unix keygen or just use an online generator like this

Hi paul,

Thanks for the info, i was aware that i would need to change all tools / configs that use the api key but i just did not know how to replace the current one. I’ll do it when i get home or during lunch break.

Thanks again

Hi @pb66,

Sorry for starting up an old thread, but can you please elaborate on how you can use phpmyadmin to edit the emoncms API write key for example? I am a beginner to emoncms and linux. So far I have installed phpmyadmin on raspbian.

Thanks in advance