Botometer Pro

부분 유료
분류별 Observatory on Social Media | 업데이트됨 vor 22 Tagen | Social
인기

9.3 / 10

지연 시간

1,141ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

API Error Response Help

Rapid account: Betatek
betatek
vor 6 Jahren

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 vor 6 Jahren

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?

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입