Authentication
Once the Datalink Instance is set up, you can then authenticate yourself to get started with using what the service has to offer;
local DatalinkModule = require(Path.To.Module)
local Datalink = DatalinkModule.new({
datalinkUserAccountId = 0,
datalinkUserToken = ""
})
Datalink:authenticateAsync():andThen(function()
print('Datalink Authenticated!')
end):catch(warn)
import DatalinkModule from "@datalinkhq/rbx-datalink"
const Datalink = new DatalinkModule({
datalinkUserAccountId = 0,
datalinkUserToken = ""
})
Datalink.authenticateAsync().then(() => {
print('Datalink Authenticated!')
}).catch(console.warn)
⚠️
Please ensure that the Authentication Key is NOT exposed to the client as this would provide an attacker full, unrestricted access to your experience's data.
💡
A recommended method to safeguard your API Key is to store it in a private and secure DataStore
.