I'm trying to make android app - client for API Redmine. First I need is authentication, but I really don't understand how to implement it. (Using Retrofit) Documentation says only:
Most of the time, the API requires authentication. To enable the API-style authentication, you have to check Enable REST API in Administration -> Settings -> API. Then, authentication can be done in 2 different ways:
using your regular login/password via HTTP Basic authentication. using your API key which is a handy way to avoid putting a password in a script. The API key
may be attached to each request in one of the following way:
- passed in as a "key" parameter
- passed in as a username with a random password via HTTP Basic authentication
- passed in as a "X-Redmine-API-Key" HTTP header (added in Redmine 1.1.0)
You can find your API key on your account page ( /my/account ) when logged in, on the right-hand pane of the default layout.
I found this solution:
- HTTP Basic auth – http://login:password@redmine.org/issues.xml
- HTTP Basic auth with API token and login – http://login:RANDOM_KEY@redmine.org/issues.xml- (not >supported yet)
- HTTP Basic auth with API token – http://RANDOM_KEY:X@redmine.org/issues.xml
- Full token auth – http://redmine.org/issues.xml?key=RANDOM_KEY
But it doesn't works. All open-source clients for API Redmine are using something like own servers/domains or what - i don't understand. Examples:
- http://**my.server**/projects/test.xml?key=1234
- http://**localhost:3000**/news.xml?key=01fc3e3832e32ae8c12bf0c3b0819ca4a5972825
- https:**sample.redmine.com**/
I need some help to understand what is this (bold text). I can't make my requests, or BASE_URL in Retrofit without this