Botometer Pro

FREEMIUM
Par Observatory on Social Media | Mise à jour 22 giorni fa | Social
Popularité

9.3 / 10

Latence

1,141ms

Niveau de service

100%

Health Check

N/A

Retour à toutes les discussions

API Error Response Help

Rapid account: Betatek
betatek
6 anni fa

I am getting the error “Missing Mashape application key” when I send the post request with Unirest PHP.

I always get an error response despite using the API keys provided;

Unirest\Response Object ( [code] => 401 [raw_body] => [body] => [headers] => Array ( [{“message”] => “Missing Mashape application key. Go to http://docs.mashape.com/api-keys to learn how to get your API application key.”} ) )

We used two API keys. We get the same error for both. First one is found when I go to the “Default Application” page, click on the “Get the Key” button located on the top right section of the screen.

The second one is found when I go to “https://market.mashape.com/OSoMe/botometer-pro” page and select the “Default Application” to Request Headers section. I then copy the Mashape API key on the right side of Request Example in the PHP section.

First My-Mashape-Key: us2J0mWtAbmsh0Muacm72IDLqmZJp1jNGKNjsniA0fjlQbERY9
Second My-Mashape-Key: o6eVPWP9rRmsh9GM4T7WKa4joboVp1bVOOajsnCv0aP0kcjjEm

My request code;

$response = Unirest\Request::post(“https://botometer-pro.p.mashape.com/2/check_account”,
array(
“X-Mashape-Key” => “My-Mashape-Key”,
“Content-Type” => “application/json”,
“Accept” => “application/json”
),
json_encode(array(“user” => array(“id” => “590030385”, “screen_name” => “murat_basci”),
“timeline” => $timeline,
“mentions” => $mentions->statuses))

);

Thanks in advance for all your help.

Rapid account: O So Me
OSoMe Commented 6 anni fa

We’re really not able to provide support for the unirest libraries. We know that Mashape’s code snippet for at least one language (Ruby) is incorrect, and none of us here know about PHP in particular.

With that said, first, your mashape keys are private and you shouldn’t post them here. If you can edit your post, you should do so ASAP.

Second, and this might be obvious, but I see in your request code that "X-Mashape-Key" => "My-Mashape-Key". Are you sending the literal "My-Mashape-Key" along? Or is that where you paste your key in your code?

Participez à la discussion - ajoutez un commentaire ci-dessous:

Connectez-vous / Inscrivez-vous pour publier de nouveaux commentaires