Skip to main content
Help

Original post by: Forrest ,

Text:

I've since discovered the answer to be No. The authToken will work for validation for most API tasks. Here is a sample for implementing this in java-script as a test.

* Log into your dozuki site.
* Go to (your-url).dozuki.com/api/2.0/user?pretty
* copy the authToken 

[image|127922]

* use it in the following javascript code

[code]
var userToken = 'Paste authToken Here';
var url = 'your_url';

function checkToken(){
    userToken = document.getElementById('token').value;

    var xmlhttp = new XMLHttpRequest();
    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            document.getElementById('demo').innerHTML = "Token Approved!"
        }
        else{
            document.getElementById('demo').innerHTML = "Token Denied"
        }
    }
    xmlhttp.open("GET",url+"/api/2.0/user", true);
    xmlhttp.setRequestHeader('Authorization','api '+userToken);
    xmlhttp.send();
}
[/code]

Status:

open