Hi @forestknutsen1,
Is you are going to use JavaScript you can:
- Use ArcGIS REST JS routing package, it is a lightweight wrapper to easily use with our APIS which works in the frontend and in the backend.
- But if you are familiar with the ArcGIS Maps SDK for JS, you can use the esri/rest/route module, in the client but also in NodeJS like shown in this tutorial.
The Routing chapter in the Mapping APIs and location services guide has a ton of resources to help you with that, including links to the Routing & Directions API collection in Postman.
So, you can use route.arcgis.com or route-api.arcgis.com, bot are enhanced endpoints and are functionally equivalente (more).
In terms of how to authorize, you have all options available, I would recommend API keys or app credentials, unless the end user of the app has an ArcGIS identity & the app request authentication (types of authentication comparison).
And last but not least, should you use ArcGIS Online?? Maybe, you can also use a free ArcGIS Developer account which is tight to ArcGIS Platform and includes:
- A free tier (20,000 simple routes, 5,000 service areas, ...)
- And I can be also used for commercial use.
More info about differences between account/product types in: Products, subscriptions, and accounts:
I hope this helps.
Cheers!,
Raul