Skip to content

Purge File Returning Error #4

@casbboy

Description

@casbboy

I'm certain I have the right variables in cloudflare_api(), as if I do:

$result = $api->get_zones();
var_dump($result);

This returns the zones and results for the account. So looks like api key and email are correct. But then I try:

$identifier = $api->identifier('mydomain.com');
$files = [
    'http://cdn.mydomain.com/youtubeheader.jpg'
];
$result = $api->purge_files($identifier,$files);
var_dump($result);

It outputs this error:


 ["errors"]=>
  array(2) {
    [0]=>
    object(stdClass)#3 (2) {
      ["code"]=>
      int(7003)
      ["message"]=>
      string(81) "Could not route to /zones/purge_cache, perhaps your object identifier is invalid?"
    }
    [1]=>
    object(stdClass)#4 (2) {
      ["code"]=>
      int(7000)
      ["message"]=>
      string(21) "No route for that URI"
    }
  }

What am I doing wrong?

Cheers
Ryan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions