# Quickstart This guide will help you get up and running making your first Optimal Outcomes API call in just a few minutes. You will create a user token & secret combination and ping the Optimal Outcomes API. This guide assumes you are an Optimal Outcomes Registry customer with Account Manager access to your dashboard. ### Create an API user to generate API credentials: 1. Login to your Optimal Outcomes Registry account as the **Account Manager** 2. Navigate to your **Account's Users and Contacts** then click on the **Add New API User** button, which is located directly above the list of your account's users. 3. Fill out the API user details, as you would for any new user. 4. After you Submit the new User, a popup will appear with the **Client Id and Secret** you will use to generate an 0Auth API token. ![API Credential example](/assets/apicredentials.ced9f753b74253956abc2773214d9c71b2e108006ab7ece09d2a51e6a34aebfa.1cb992fd.png) ### Generate OAuth2.0 token In order to perform calls to Xpansiv Optimal Outcomes API, clients have to request a session token the request. Bearer tokens are issued by Xpansiv Authorization Server. The Authorization Server URL will depend on the environment you are sending requests. | Environment | URL | | --- | --- | | PROD | https://apxidentityprod.b2clogin.com/apxidentity.onmicrosoft.com/B2C_1A_APITOKEN/oauth2/v2.0/token | | UAT | https://apxidentityuat.b2clogin.com/apxidentityuat.onmicrosoft.com/B2C_1A_APITOKEN/oauth2/v2.0/token | In the token request, the scope of the access request will be different | Environment | URL | | --- | --- | | PROD | https://apxidentityprod.onmicrosoft.com/external-api/.default | | UAT | https://apxidentityuat.onmicrosoft.com/external-api/.default | ### Postman Resources for UAT The following Postman Resources can be imported into a Postman workspace to get you started with Optimal Outcomes API. **UAT Environment:** [UAT Environment json](/assets/uat.postman_environment.7abbd49384932dcf26296ef94d763c4970216a0e5936fbfc93d1a1642697b624.49df5aae.json) **UAT API Endpoint Collection:** [UAT API Collection json](/assets/optimal_-_external_api.postman_collection.0402a4bcdb09567dd5339d73f180290769498b76a7c50c430b0fa761153dd970.49df5aae.json) After importing the UAT Environment in Postman, populate and save the **clientId** & **clientSecret** environment variables with the API credentials generated for your Optimal API User (see above). ![UAT Environment Variables](/assets/api_environment.0d1960a81b22a734c4aa04b081f0a914054099e2b84f4d4b53b0c383b854fece.1cb992fd.png) You are now ready to generate an API session token, by navigating to **Collections: Optimal - External API -> Auth**. ![UAT Environment Generate Token](/assets/generate_token.195ddb212717f906f9abe448925c56aa0aa27bde9c8e48a6cd4afeda8b78d624.1cb992fd.png) The **clientId** & **clientSecret** environment variables have already been populated, along with the **Refresh Token & Scope URLs**. Click on the **Get New Access Token** button. After the Access Token is generated, click on the **Use Token** button. ![UAT Environment Use Token](/assets/use_token.99e78b64d733506ebf64cfeff07ccd0e55c51fec45958fb9212ac4c31236ac1d.1cb992fd.png) The generated access token will now be used when you make an Optimal Outcomes API request.