Quick Start - Call Authentication
Pre-requisites
- First Orion Branded Communications agreement
- Access to First Orion Customer Portal
- Vetted and Approved Business
- Ability to originate phone calls from configured phone numbers in calling platform
- Understanding of current calling platform and environment to integrate required API
Steps
The following steps detail the process of configuring an Authenticated Calling Program in the First Orion platform.
Step 1 - Login to First Orion Portal
Step 2 - Locate Business
- Scroll down to the list of businesses
- Search based on Business Name or Business ID
- Click on the business
Step 3 - Add Logo to Image Gallery (for new images)
- Navigate to Image Gallery
- Upload and SVG that adheres to the file restrictions.
Step 4 - Setup Program
Inform + Paired
- Navigate to the Business Unit level.
- Click Manage in the top right.
- Click Create Program.
- Select the Inform + Paired program type.
- Name the program and select the call purpose.
- Click into Display to add the text display and the program duration.
- Note - skip the "Image" step to ensure the Program is not created as Inform with Logo
- Click into Phone Numbers to add numbers for branding.
- Click Launch.
Inform with Logo
- Navigate to the Business Unit level
- Click Manage in the top right
- Click Create Program
- Select the Inform + Paired program type.
- Name the program and select the call purpose.
- Click into Display to add the text display and the program duration.
- Click into Image and select the previously uploaded image.
- Click into Phone Numbers to add numbers for branding.
- Click Launch
Sentry
- Navigate to the Business Unit level
- Click Manage in the top right
- Click Create Program
- Select the Sentry program type.
- Name the program and select the call purpose.
- Click into Display. Set program duration then either toggle branding off (just shows phone number) or add the text display.
- Click into Phone Numbers to add numbers for Sentry.
Step 5 - Generate API Keys
- Navigate to the API Keys section on the left hand side.
- Click Generate Key the generate new key.
- Copy and save or download the generate keys.
Step 6 - Integrate Call Authentication API
- Verify being able to generate an access token.
curl --location --request POST 'https://api.firstorion.com/v1/auth' \
--header 'X-API-KEY: [API KEY FROM PORTAL]' \
--header 'X-SECRET-KEY: [SECRET KEY FROM PORTAL]' \
--header 'X-SERVICE: auth' \
--header 'accept: application/json'
- Verify being able to make an Authenticated Call API push.
curl --location 'https://api.firstorion.com/exchange/v1/calls/push' \
--header 'authorization: Bearer [FROM GET TOKEN ENDPOINT]' \
--header 'content-type: application/json' \
--data '{
"aNumber": "+18668561234",
"bNumber": "+15019515678",
"businessId": "0e79a3bc-18d1-4f5c-a781-458f8bad9b22"
}'
- Identify where in the platforms call flow this can live and integrate it.
Example Javascript below.
// Libraries
const axios = require('axios'); // Install with, npm install axios
// Gets First Orion Auth Token
const getToken = async () => {
try {
const response = await axios.post(
'https://api.firstorion.com/v1/auth',
null,
{
headers: {
'X-SERVICE':'auth',
'X-API-KEY': 'your-api-key',
'X-SECRET-KEY': 'your-secret-key',
'Content-Type': 'application/json'
}
}
);
return response.data.token;
} catch (error) {
console.error('Error:', error);
return {
statusCode: error.response ? error.response.status : 500,
body: JSON.stringify({ error: error.message })
};
}
}
// Create pre-call push to First Orion for Call Authentication
// Find out more at: https://developer.firstorion.com/firstorion-public/reference/callauthentication
const push_callauth = async (token) => {
let data = JSON.stringify({
"aNumber": '+15555555555',
"bNumber": '15554444444',
"businessId": 'your-business-id'
});
let config = {
method: 'post',
url: 'https://api.firstorion.com/exchange/v1/calls/push',
headers: {
'Authorization': token,
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
}
// Main function to invoke the pre-call push for call authentication.
const main = async () => {
const token = await getToken();
await push_callauth(token);
await createCall();
}
main()
Updated 3 months ago