sends client-id and clinet-secret with ajax

your java script code was incomplete