Authenticate with TransportOne
13 min
all transportone apis require secure authentication using the oauth 2 0 client credentials flow this page explains how to generate access tokens and add the required headers to your api requests 1\ get your credentials you’ll receive the following credentials during onboarding from the os1 team credential description clientid unique client identifier assigned to your erp app clientsecret secret used to generate access tokens tenantid tenant key used to form api urls and identify orgs x coreos access api access key scoped to your tenant note note you don’t need to create these yourself these are shared by os1 during sandbox or production onboarding 2\ choose your environment transportone offers two environments environment base url format purpose sandbox https //{tenantid} sandbox getos1 com use for testing production https //{tenantid} logistax io use after go live so the final auth endpoint will be for sandbox https //{tenantid} sandbox getos1 com/core/api/v1/aaa/auth/client credentials for production https //{tenantid} logistax io/core/api/v1/aaa/auth/client credentials 3\ generate access token to access any api, you must first authenticate using your client credentials auth endpoint http post /core/api/v1/aaa/auth/client credentials note note use the environment specific base url when calling this endpoint — either sandbox for testing or production for live operations request headers header required description x coreos request id yes unique id for each request (uuid) content type yes always application/json request body json { "clientid" "yourclientid", "clientsecret" "yourclientsecret" } sample curl curl curl location 'https //{tenantid} sandbox getos1 com/core/api/v1/aaa/auth/client credentials' \\ \ header 'x coreos request id random 1234' \\ \ header 'content type application/json' \\ \ data '{ "clientid" "yourclientid", "clientsecret" "yourclientsecret" }' sample response json { "data" { "accesstoken" "eyjhbgcioijiuzi1 ", "expiresin" 86400, "tokentype" "bearer" }, "request" { "uri" "/core/api/v1/aaa/auth/client credentials", "method" "post", "querystring" "{\\"cached\\"\ false}", "body" { "clientid" "xyz", "clientsecret" "xyz" } } } token details field description accesstoken token to be used in authorization header expiresin token validity in seconds (e g , 86400 = 1 day) tokentype typically "bearer" 4\ add required headers to all api requests every request to a transportone api must include these headers header required description authorization yes bearer \<accesstoken> from the auth response x coreos access yes api access key from os1 onboarding x coreos tid yes your tenant id x coreos request id yes unique uuid per request content type yes always application/json you're authenticated! once you’ve obtained a valid token, you can begin calling any of the tms apis however, to start pushing sales orders and integrating with transportone make sure your master data is set up this includes facilities and product information, which are required for all downstream apis like order, load, and invoice if it’s already configured by our team, you’re all set if not, you can set it up using the master data apis or contact us for help next https //docs1 getos1 com/explore all apps https //docs1 getos1 com/explore all apps/planning and execution interfaces
