Close
logo

Getting Company Id by Token

Git RepositoryEdit on Github
Last update: 2 years ago by luigi mangaReading time: 2 min

When creating resources with Onport API or making calls to specific endpoints, it might be required to pass the companyId. This field represents the unique id of the company within Onport.

The recommended approach to collect the companyId is by making a GET call to /api/auth/current.json.

Based on the Authorization token being passed as a header, the endpoint will respond with information on the current API user as well as the companyId attribute.

curl --request GET \
--url https://api.jetti.io/api/auth/current.json \
--header 'Authorization: Bearer {{token}}'
๐Ÿ” Recipes โ€” Previous
Custom fields
Next โ€” ๐Ÿ” Recipes
Image Transformation