WordsAPI

FREEMIUM
Verified
Por dpventures | Atualizado 23 दिन पहले | Data
Popularidade

9.9 / 10

Latência

179ms

Nível de serviço

100%

Health Check

N/A

Voltar para todas as discussões

Random words url requires application key

Rapid account: Papostolopoulos
papostolopoulos
7 वर्ष पहले

Hello,
When using https://wordsapiv1.p.mashape.com/words/?random, I get an error that I am missing the application key.
How can I attach the key that I have in the existing URL?

Thank you in advance.

Rapid account: Wordsapi
wordsapi Commented 7 वर्ष पहले

You can’t send the API key in the url, it has to be passed as a header. You can send header info from the client via javascript (assuming it’s web based), but beware of exposing your key like that.

Rapid account: Papostolopoulos
papostolopoulos Commented 7 वर्ष पहले

That does not quite answer my question. I did go through the documentation but the instructions are for backend calls.
I want to have a clean url that I can use for a GET request and consume the information through the client side of my app.
The instructions provide information for curl, java, node etc but do not explain what the url should look like.

For example, other applications have the url format as:
https://someApiService.com/articles?source=someSource&sortBy=someShorting&apiKey=1234567890

what is the correct syntax for the url to have the api key attached and return the words?

Rapid account: Wordsapi
wordsapi Commented 7 वर्ष पहले

Hi papostolopoulos,
You have to send it in the ‘X-Mashape-Key’ header. You can find examples in several languages on the Documentation page:

https://market.mashape.com/wordsapi/wordsapi

Junte-se à discussão - adicione o comentário abaixo:

Efetue login / inscreva-se para postar novos comentários