JavaScript is required to use Bungie.net

Service Alert
We are actively investigating issues impacting players' ability to sign in to all Destiny releases on PlayStation Platforms. Until resolved, players may experience disconnects or be unable to sign in. Please stay tuned to @BungieHelp for updates.

#php

originally posted in:BungieNetPlatform
9/28/2015 9:59:56 AM
4

Struggling with API access (PHP). Have Key, need help.

Hi there, I've been playing around with the API for a while now but am having issues with the new 'key required' access. I'm new to cURL and REST api, but have a basic php understanding, however I'm struggling since the access update. I've copy and pasted the code from the wiki [url]http://bungienetplatform.wikia.com/wiki/Getting_Started[/url] and replaced 'YOUR -API-KEY-HERE' with my key but keep getting a Trying to get property of non-object error. Is the code still viable now keys are mandatory? What am I doing wrong? Thanks Anthony [quote] Here is my code; <?php $apiKey = 'YOUR-API-KEY-HERE'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://www.bungie.net/platform/Destiny/Manifest/InventoryItem/1274330687/'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-API-Key: ' . $apiKey)); $json = json_decode(curl_exec($ch)); echo $json->Response->data->inventoryItem->itemName; //Gjallarhorn [/quote]
English
#php #wiki #apikey

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

View Entire Topic
You are not allowed to view this content.
;
preload icon
preload icon
preload icon