Skip to main content

Introduction

Welcome to the reference documentation for the 1WorldSync Platform API!

To learn more about the common use cases of 1WorldSync Platform API, check out the different API guides.

Quick start

Here is an example on how you can access our API in a simple way with curl. You can find advanced cases in the Howto's.

Retrieving an access token

For authenticating your API calls, you need to pass an OAuth2 access token. Make sure you have your client_id and client_secret at hand. The following snippet places the token in an environment variable $TKN:

client_id="my-client-id"
client_secret="my-client-secret"

export TKN=$(curl -s --location --request POST \
'https://eu.auth.atrify.com/auth/realms/platform-api/protocol/openid-connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id='${client_id} \
--data-urlencode 'client_secret='${client_secret} \
| jq .access_token | sed 's/"//g')

Also note that if you don't pass any scopes, your token will automatically contain all scopes that are available to your client.

Request a resource

Now you can use the token in the $TKN variable to do calls against the API endpoints. In this example against the receivers endpoint:

curl --location --request GET \
"https://eu.api.atrify.com/v1/receivers/<receiverGln>/items" \
--header "Authorization: Bearer $TKN"