Back to Index

POST v1/ClientAuthToken

Creates a Client Authorization Token

Request Information

URI Parameters

NameDescriptionTypeAdditional information
version

string

None.

Body Parameters

client_auth_token_request
NameDescriptionTypeAdditional information
return_url

The URL used for redirection, when provided.

string

String length: inclusive between 0 and 2048

account_token

The token used to identify the Peloton account

string

Required

String length: inclusive between 32 and 32

application_name

The name of the calling application

string

Required

String length: inclusive between 0 and 128

language_code

Determines the Language of the response data. 2 Character ISO LanguageCode. Supported language codes are: 'en' (English), 'fr' (French). Default is 'en'.

string

None.

Request Formats

application/json, text/json

Sample:
{
  "return_url": "sample string 1",
  "account_token": "sample string 2",
  "application_name": "sample string 3",
  "language_code": "en"
}

Response Information

Resource Description

client_auth_token_response
NameDescriptionTypeAdditional information
client_auth_token

The one-time-use client authorization token

string

None.

success

True if successful, false otherwise

boolean

None.

message

The message related to the operation in the language specified by the request

string

None.

message_code

The code associated with the message

integer

None.

errors

List of validation errors that occured, otherwise empty

Collection of string

None.

Response Formats

application/json, text/json

Sample:
{
  "client_auth_token": "sample string 1",
  "success": true,
  "message": "sample string 3",
  "message_code": 4,
  "errors": [
    "sample string 1",
    "sample string 2"
  ]
}