Skip to content

I can't seem to get the delete function working #978

@EggAndToast

Description

@EggAndToast

When using a key with lower level, i get the response of :
{
"status": false,
"error": "This API key does not have enough permissions"
}

But when i use a Key of level 10, i get the response of:
{
"status": false,
"message": "Invalid API key"
}

image

image

image

Current Codes are:

$key = $this->input->get_request_header('X-API-KEY', TRUE);

$data = array(
				'Authorization' => "Basic " . base64_encode("admin:1234"), 
				'X-API-KEY' => $key
			);

			$input = array(
				'key' => $key
			);

			$request = Requests::delete('http://localhost/project/ci/index.php/api/key',$data);
			$request = json_decode($request->body);

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions