Jump to content

Invalid API key


iobrien

Recommended Posts

Posted

Trying to access API. Have enabled all endpoints, but being met with the following:

{
    "errorCode": "3S290\/7",
    "errorMessage": "INVALID_API_KEY"
}

Have tried whitelisting IP, accessing from another IP, generating a new API key, and limiting which endpoints are available.

  • 1 month later...
Posted

I am having the exact same issue, any luck mate?

I have found that when using the browser URL to try and perform a GET from the API, it doesn't work, resulting in returning the error INVALID_API_KEY.

i.e. https://www.communiturl.com/api/core/hello?key=keygoeshere

But however when you use a php script, it works.

<?php
	
	$communityUrl = 'https://www.communityurl.com/';
	$apiKey = 'keygoeshere';
		
	$curl = curl_init( $communityUrl . 'api/core/hello' );
	curl_setopt_array( $curl, array(
		CURLOPT_RETURNTRANSFER	=> TRUE,
		CURLOPT_HTTPAUTH	=> CURLAUTH_BASIC,
		CURLOPT_USERPWD		=> "{$apiKey}:"
	) );
	$response = curl_exec( $curl );
	
	echo $response;
?>

Would this be due to how the variable ?key= isn't being received correctly?

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...