Edvak Docs
HomeFHIR APICCDA API
HomeFHIR APICCDA API
LinkedIn
  1. APIs
  • Getting Started
    • Introduction
    • Authentication & Access
    • Errors
  • APIs
    • Generate Token
      POST
    • CCDA Retrieval
      GET
  • Legal & Compliance
    • API Terms of Use
  1. APIs

Generate Token

Developing
Sandbox
https://darwinapi.edvak.com
Sandbox
https://darwinapi.edvak.com
POST
https://darwinapi.edvak.com
/ccda/ccda/generate-token
Generates an OAuth 2.0 access token using the Resource Owner Password Credentials (ROPC) grant type. Requires the user's username, password, along with the application's client_id and client_secret. The token must be used as a Bearer token in all authorized CCDA API requests.
WARNING
The request must be sent using application/x-www-form-urlencoded content type.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params
Content-Type
string 
required
Example:
application/x-www-form-urlencoded
Body Params application/x-www-form-urlencoded
client_id
string 
required
App’s unique identifier (usually a UUID).
Example:
54854db1-0abd-4d64-96a7-2e1e916b9ce1
client_secret
string 
required
Secret key to authenticate the client app.
Example:
AsmLjDJSbNs5j2L06RhdfCJKUW63XhUz
password
string 
required
User’s account password.
Example:
fa73xCqfmbEL9CF
username
string 
required
User’s login email or username.
Example:
[email protected]

Responses

🟢200Success
application/json
Body
message
string 
required
token
object 
required
access_token
string 
required
expires_in
integer 
required
refresh_expires_in
integer 
required
refresh_token
string 
required
token_type
string 
required
not-before-policy
integer 
required
session_state
string 
required
scope
string 
required
patient
string 
required
tenant
string 
required
Example
{
  "message": "Token generated successfully",
  "token": {
    "access_token": "ey2e8mzoih38wLeJH50QsrWpYkIL0p8c8Jr5.lxBJ4xUHUdrVf1uP76yow7jxaeOgXCpzby1oZiB4eaAOj4Z3TaKF460EH2H3Rnp3rblBkys9l1PjCzWS.ehdIzNVT4385CrKXlEIQ8gtlo4Y0MyBI0kY5Dt5B...",
    "expires_in": 900,
    "refresh_expires_in": 8208000,
    "refresh_token": "ey2e8mzoih38wLeJH50QsrWpYkIL0p8c8Jr5.lxBJ4xUHUdrVf1uP76yow7jxaeOgXCpzby1oZiB4eaAOj4Z3TaKF460EH2H3Rnp3rblBkys9l1PjCzWS.ehdIzNVT4385CrKXlEIQ8gtlo4Y0MyBI0kY5Dt5B...",
    "token_type": "Bearer",
    "not-before-policy": 1741856296,
    "session_state": "712430d3-da39-4cad-884b-862d32ac9c6d",
    "scope": "patient/MedicationDispense.rs profile patient/Patient.rs tenant patient/ServiceRequest.rs patient fhirUser patient/Coverage.rs email",
    "patient": "3",
    "tenant": "TENANT_AB"
  }
}
Previous
APIs
Next
CCDA Retrieval
Built with