{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-data-hub/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Authentication","description":"Gateway to technical documentation for EGYM Platform.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"authentication","__idx":0},"children":["Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Data Hub uses API key authentication. Send the API key in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-api-key"]}," header."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"x-api-key: <api-key>\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["EGYM provisions the API key for your gym location. Export endpoints use the gym location associated with the API key, so clients do not send a gym ID in the path or query parameters."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"location-scope","__idx":1},"children":["Location scope"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The API key identifies the partner and gym location for the export request. The API uses the authenticated API key to resolve:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["partner identity"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["gym location name"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["gym legacy ID"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["permissions granted to the API key"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Responses only contain data for the gym location associated with the API key."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"error-responses","__idx":2},"children":["Error responses"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Status"},"children":["Status"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Reason"},"children":["Reason"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401 Unauthorized"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-api-key"]}," header is missing, malformed, or invalid."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403 Forbidden"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The API key is valid but is not authorized to access this resource."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example-request","__idx":3},"children":["Example request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl --request GET \\\n  'https://analytics.api.egym.com/api/v1/data/smart-strength-workouts?startDate=2026-06-01&endDate=2026-06-15' \\\n  --header 'x-api-key: <api-key>'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All requests must use HTTPS. Calls made over plain HTTP will fail."]}]},"headings":[{"value":"Authentication","id":"authentication","depth":1},{"value":"Location scope","id":"location-scope","depth":2},{"value":"Error responses","id":"error-responses","depth":2},{"value":"Example request","id":"example-request","depth":2}],"frontmatter":{"seo":{"title":"Authentication"}},"lastModified":"2026-06-23T13:30:30.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/data-hub/authentication","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}