OAuth — Bearer Token
Another option to authenticate to Splitit is to fetch an OAuth token from our id server by sending your Splitit API credentials—API Username and API Password—in a request body encoded as "x-www-form-urlencoded". When you receive your token, you must add it as a bearer authentication header to your subsequent API calls. (Note that you can generate more than one token at a time.)
post
https://id.{environment}.splitit.com/connect/token
curl --request POST \
--url https://id.sandbox.splitit.com/connect/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials \
--data scope=api.v1 \
--data client_id=xxxxxxxxx \
--data client_secret=xxxxxxxx
Remember to change "sandbox" in the url to "production" if applicable.
Last modified 8mo ago