stackoverflow04
stackoverflow04

Reputation: 9

make API on the server available only for me

There are public API on the server that consists of url requests. I want this API will be available only for me. What can I do for that? I use IOS and this will be Iphone app.

Upvotes: 0

Views: 105

Answers (2)

Mikhail Viceman
Mikhail Viceman

Reputation: 604

When you send request to your server, in the body of your request you can send some key, that only you application and your server knows.

To protect your app from reverse engineering: you could collect your string in multiple strings, and then merge them in one string. For example, if you have string "ios", you can create three string "i" "o" "s" and then merge them in one in your urlrequest. In this case reverse engineering and strings on the binary don't work.

Upvotes: 1

Mahmoud Fayez
Mahmoud Fayez

Reputation: 3459

Try to execute this scneario it is slower but it is good.

  1. Server will send challenge phrase
  2. iPhone will send the phrase encrypted with certain key.
  3. server will record this session as valid for 30 minutes.
  4. iPhone send the encrypted challenge phrase with each request it will send to the server.

Upvotes: 0

Related Questions