Getting Company Id by Token

Git RepositoryEdit on Github
Last update: 9 months ago by Francesco de LorenziReading time: 2 min

When creating resources with Jetti 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 Jetti.

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 \
--header 'Authorization: Bearer {{token}}'
๐Ÿ” Recipes โ€” Previous
Custom fields
Next โ€” ๐Ÿ” Recipes
Image Transformation