Build and Test
With your integration designed, kickstart your development with guides and references built by athenistas. Review best practices, authentication models, and start preparing for validating your solution.

-
Authentication & Authorizations
To get access to practice data, the user must authorize an app through the authorization flow. You will get an Access Token at the end of the process.
The new platform will now require you to request a scope. It is important to note that without the correct grant type and scope requested, OAuth requests for access tokens will fail. The following example demonstrates how to successfully get a token for preview:
curl -u {CLIENT_ID} --data "grant_type=client_credentials&scope=athena/service/Athenanet.MDP.*" \ https://api.preview.platform.athenahealth.com/oauth2/v1/token
You should receive a response like the following:
{"access_token": "bSQeVaRd47Tnof8GWbDZTud9ghLP", "expires_in": "300"}
Breakdown:
-
access_token - the same as before and to be used as a bearer token in API requests
-
expires_in - represents the lifetime of the token in seconds
Token Expiration
-
The token lifespan is 60 minutes, which is the same as it was on the old platform.
-
-
Testing Application
By default, all users of the developer portal are granted access to a shared sandbox (ContextID: 195900). Once you have contracted for Platform Services, and your tablespace has been sufficiently configured, you will receive your own Preview environment with which you can developer and test your application.
-
Troubleshooting
Refer our error codes section for learning more about handling errors, and troubleshooting.
Pro-Tip: Refer Best-practices section for handling errors.
If you get stuck while developing or testing your solution, please review the Support page for common issues and questions. If you're unable to find the answer there or resolve on your own, you may opt to use your available Solution Consulting.
Recommendations
- Utilize Postman download option for exploring APIs in your local machine. Read here for instructions on using Postman.
- Bookmark the articles, workflows and APIs you are planning to use in your solution for ease of access.
- Take the full advantage of Search functionality for exploring the vast APIs and workflows built for you.
Checkout our Best-practices section for guidelines while building the solution.