API v2 info/documentation

Hi there,

I saw there was now info available for the v2 api, but i was wondering if this info is complete/correct or the v2 api is not up yet?

I tried what was mentioned in the info under my account for v2 but what ever i try i get a 404 for the api url (currently trying the client/public section).

I am not sure but the url listed is https://warcraftlogs/api/v2/x, should this not be https://warcraftlogs.COM/api/v2/x ? or also a port added like v1? i tried all the url setups i can think of, no .com, with .com, with a port, with no port. without .com is does not find the host ofc and with .com and with or without a port i get a 404 for the v2 api.

I am using the insomnia client as suggested (with the oauth2.0 flow/token), and first off i get an ssl error, and then without ssl verification its a 404.

Any info or assistance would be appreciated for the v2 api.

Cheers.

v2 is still under development, so not really ready for production code yet. And yeah it should be warcraftlogs.com in the docs, will fix.

Cheers for the response.

Might i suggest that if it’s not ment to be “used/played with” yet, to remove any mention of the v2 api?
Right now it looks like v2 is up and usable/viewable.

I was trying to see what endpoints where available, but how i read it nothing for the v2 api is live yet, including checking out its schema’s?

It is available. Follow the instructions in client credentials flow, use curl etc. to get an access token and then set your Authorization header to have the bearer access token in Insomnia.

In case anyone is still confused about the URL, it’s https://{site}.warcraftlogs.com/api/v2/client

For example, https://classic.warcraftlogs.com/api/v2/client

This brings me to the main classic warcraftlogs page, anyone else?

Hi there, I was interested in using the API to get some logs into an automation tool I’m trying to develop. Where can I get API documentation, i.e. samples, how-to’s, etc.?

v2 documentation appears inside whatever GraphQL tool/app you use.

Thanks for your quick reply. I’m using GraphQL Editor online just to play around, tried to load the schema from https://classic.warcraftlogs.com/api/v2/client and got the below error.

image

I’m most likely using the wrong schema URL, amirite?

I’m getting an empty response when I do the same. I seem to have a valid client token and was expecting schema info. Hopefully someone has some help here?

I’m experiencing the same thing, did you happen to figure it out? I’m a bit newbie at graphql but not sure what could be messing up my queries. I curled for an access token, posted it and using the schema to try to get any data coming back and everything is just a [] response.

I’m trying to access the v2 documentation too. I’m successful with the call to get an authorization token but when I call the url provided (https://www.warcraftlogs.com/api/v2/client) I just get a 302 Redirect to the home page. I’m using PHP: -

// Get an access token
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, array(
    'grant_type' => 'client_credentials',
    'client_id' => '????',
    'client_secret' => '????'
    ));
curl_setopt($curl, CURLOPT_URL, 'https://www.warcraftlogs.com/oauth/token');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
$resultObject = json_decode($result, true);
// Call the API
$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
    'authorization' => 'bearer ' . $resultObject['access_token']
));
curl_setopt($curl, CURLOPT_URL, 'https://www.warcraftlogs.com/api/v2/client');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($curl);
?>```

make sure to add a json accept header.

I was able to run using Insomnia and using graphql queries. Something along the lines of:

Got the token using simple curl:

curl -u client_id:secret -d grant_type=client_credentials https://www.warcraftlogs.com/oauth/token

And added both headers:

image