WordsAPI

부분 유료
Verified
분류별 dpventures | 업데이트됨 לפני 25 ימים | Data
인기

9.9 / 10

지연 시간

178ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

how to use the mashape api ( with wordsapi ) in production environment?

Rapid account: Toniweb
toniweb
לפני 7 שנים

Hi there,

I have a mashape api with wordsapi,

In localhost, it works great;

The problem is that when I try to use the code in production environment I get this response from any request API:

object(Unirest\Response)#2 (4) {
[“code”]=>
int(401)
[“raw_body”]=>
bool(false)
[“body”]=>
NULL
[“headers”]=>
array(1) {
["{“message”"]=>
string(123) ““Missing Mashape application key. Go to http://docs.mashape.com/api-keys to learn how to get your API application key.”}”
}
}`

It doesn’t matter if I use the testing or the production key…

Can you give me a hint?

I am using php and this is my code:

`response=Unirest\Request::get("https://wordsapiv1.p.mashape.com/words/run),array("XMashapeKey"=>"OpOZ1vYIn7msxxxxxxxxxxxxxxxxxxxxxxxx8GjsnrcGXjUzseBWp","Accept"=>"application/json"));response = Unirest\Request::get("https://wordsapiv1.p.mashape.com/words/run'), array( "X-Mashape-Key" => "OpOZ1vYIn7msxxxxxxxxxxxxxxxxxxxxxxxx8GjsnrcGXjUzseBWp", "Accept" => "application/json" ) ); raw_body = json_decode($response->raw_body);

Best regards!

thansk in advance

Rapid account: Toniweb
toniweb Commented לפני 7 שנים

Since in local environment the request works, i can only assume it’s setted up correctly…

Rapid account: Wordsapi
wordsapi Commented לפני 7 שנים

Hi,
There shouldn’t be any difference where you call the API from. Make sure that the mashape key is being loaded correctly. If it is, you may want to reach out to Mashape, since it looks like the request is being blocked by them and never even making it to Words API.

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

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