Reputation: 530
I have made an RESTful API to my SaaS site.
To use it, users have to input a token key as an argument in the URL.
Even though it's under SSL, I don't like the fact that the key goes in the URL.
What are other ways to secure an API?
Upvotes: 2
Views: 84
Reputation: 41888
The usual approach is to send the token in an HTTP header, not the URI. You should use the Authorization
header itself to keep it standard. When you need to send a token and not a user/password, use a custom realm.
For instance, you can use something like:
Authorization: MyCompanyLogin apikey="8hj34893u32j9023r02r"
Upvotes: 1