Common Header

Common headers define parameters that are used in common by the ThinQ Connect APIs.

Name

Type

Required

Description

Default

Example

Authorization

string

mandatory

  • A token value issued by the LG EMP (Enterprise Membership Platform) according to the OAuth standard for user authentication
  • With this token, LG ThinQ Platform identifies which user's device information to provide and verifies whether your service is authorized to use that user's device information. 
  • In accordance with the OAuth 2.0 specifications, a type bearer before the token value is declared.

Bearer {token}

None

" Authorization" : "Bearer 5a9a713f51a95c53d781addd1af0dfa4f6e1e7420a8bff3c5198308dac571aa9845832b8d29bbe1f04deec2d35229c6d",

x-country-code

string

mandatory

None

" x-country-code" : "KR",

x-message-id

string

mandatory

You must create and enter a new unique value for each API call.
  • A value for tracking the information requested by LG ThinQ Platform that is used to track the flow of a specific API and to find the cause of an error.

  • How to create: 

    • Must be created with the url-safe-base64-no-padding (UUID Version 4) method.

    • Up to 22 characters
    • Example code (Python)

import uuid
import base64
messageId = base64.urlsafe_b64encode(uuid.uuid4().bytes)[:-2]

None

" x-message-id" : "0123456789012345678912",

x-service-id

string

mandatory

  • A Service ID value which is issued after registering your service to LG ThinQ Platform. Used to identify your service on LG ThinQ Platform along with the service KEY value

None

" x-service-id" : "470ae4c534ba143cad86e5c3",

x-service-key

string

mandatory

  • A Service KEY value which is issued after registering your service to LG ThinQ Platform. Used to identify your service on LG ThinQ Platform along with the service IDvalue
  • This KEY does not expire. However, the KEY can be updated by request, and periodically updating the KEY is recommended as a security measure.

None

" x-service-key" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXJ2aWNlSWQiOiI0NzBhZTRjNTM0YmExNDNjYWQ4NmU1YzMiLCJ0b2tlblNlZWQiOiI1Zjc2MWQwMDU2YmE4NWJkIiwidGltZSI6MTUxNjM0MTkzMn0.aznAEnUItCWc2UAFvoiIYDw0SCJDoY5xVCNnUyUJeiI",

x-conditional-control

boolean

optional

  • This value is used only for the device control request (POST / devices / {device-id}).
    • if true,
      • The request first retrieves the device status and executes the control command only in a controllable status.
    • if false,
      • The request executes the control command without checking for the device status.
true
"x-conditional-control" : true,