18 OpenClinica 4 Technical Documentation

API users of OpenClinica will need an authentication token in order to access the API endpoints. An authentication token can be obtained by calling the following endpoint:

URL:

POST {serverName}/user-service/api/oauth/token

where {serverName} is your study build URL. For example: https: //xyz.build.openclinica.io

Request Header:

  • Content-Type: application/json

Request Body:

{
	"username":" ",
	"password":" "
}

Response Body:

Response body will contain the authentication token.

API users should then supply this authentication token (as shown below) in the “Authorization” header as a bearer token when accessing other endpoints.

Authorization: Bearer "authentication token";

Functional approval by rbhatnagar. Signed on 2019-02-08 3:43PM

Approved for publication by Laura Keita (lkeita), Director of Training and Compliance. Signed on 2019-02-11 9:12AM

Not valid unless obtained from the OpenClinica document management system on the day of use.