About Session Register api usage

As we talked here

We want to try to use session regiester api, seem like here are required fields
Header

  • x-api-key
    Body
  • userId
  • deviceId
  • deviceInfo
  • displayName
  • authToken

My question are

  • For x-api-key, value will be the same as apiKey that we use for eko-sdk right?

  • For deviceId, deviceInfo - how can I get theses value? or what value should be?

  • Seem like to get authToken we’ll have to get it from /authentication/token api, but that api require header name x-server-key, So how can I get that server key?

As I tried to put apiKey that we used for eko-sdk as server key, I got error Invalid server key.

Hi @tlezip -

  1. yes x-api-key is the API Key you use
  2. deviceId would identify the user device - in the case you’re calling from your server a deviceId may just be server-user-5837 to represent that it’s your server calling on the behalf of user-5837
  3. server key can be obtained from ASC Console - please note that this will require you to enable secure mode and all SDK init call will then need to always use authToken - this must be turned on in production system. https://docs.amity.co/console/settings/security

Thank you for explanation.

What about deviceInfo parameter?

It’s optional - you can omit the parameter