Skip to content

Login

Request

This endpoint logs in the user and returns the access token

Security
partner
Bodyapplication/x-www-form-urlencoded
One of:

Device Token Request for a user, using an egym-signed partner

grant_typestringrequired

The grant type.

Enum:"PASSWORD""RFID""REFRESH_TOKEN""XID""NFC""DEVICE"
Discriminator
serial_numberstring, non-emptyrequired

The unique serial number of the machine.

machine_typestring, non-emptyrequired

The machine type name of the device.

localestring

The locale, if there is the need to override it during the login process.

Example:"en_US"
measurement_systemstring

The measurement system, if there is the need to override it during the login process.

Enum:"METRIC""US_CUSTOMARY""IMPERIAL"
machine_sw_versionstring

The version of the Software running on the Machine.

Example:"5.3.7.323"
egym_sw_versionstring

The version of the EGYM Software running on the machine.

Example:"3.589"
usernamestring, non-emptyrequired

Username. Mandatory if the grant_type is password.

passwordstring, non-emptyrequired

Password. Mandatory if the grant_type is password.

curl -i -X POST \
  https://developer.egym.com/_mock/equipment/partner-api/api/v1/oauth/token \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d grant_type=DEVICE \
  -d serial_number=string \
  -d machine_type=string \
  -d locale=en_US \
  -d measurement_system=METRIC \
  -d machine_sw_version=5.3.7.323 \
  -d egym_sw_version=3.589 \
  -d username=string \
  -d password=string \
  -d device_token=string \
  -d obfuscated_user_id=string

Responses

Ok

Bodyapplication/json
access_tokenstring

The access token

expiration_timeinteger, (int64)

The expiration time of the access token

Example:1672531200000
refresh_tokenstring

The refresh token

token_typestring

The type of token

Response
{ "access_token": "string", "expiration_time": 1672531200000, "refresh_token": "string", "token_type": "string" }