NOTE: The BioStar 2 Local API Server/BioStar 2 Web API are discontinued, this article is for reference only. For new developments please use the BioStar 2 API (version 2.9.x and later). 

With the attached html file you can see that a set-token response header appears after logging in.

Save the set-token value and in your following requests configure the set-token value in header called the token.