Type Function Return value String Revision Release 2024.3703 Keywords steam, steamworks, getAuthSessionTicket, authentication See also authSessionTicketResponse steamworks.*
Returns an authentication token produced by GetAuthSessionTicket required by many SDKs to connect to Steam API. Note, that while result is available immediately, Steam API documentation suggests to wait for the authSessionTicketResponse to make sure ticket is valid and can be used.
Format or contents of this string is not specified in the documentation. It is not guaranteed to be a set of characters, it may be constant of random bytes.
steamworks.getAuthSessionTicket( )
local steamworks = require( "plugin.steamworks" ) local ticketToken local function onAuthTicketResponse(event) if event.isError then print("Error had occurred, code " .. event.resultCode) return end -- use the value of the ticketToken here end steamworks.addEventListener( "authSessionTicketResponse", onAuthTicketResponse ) ticketToken = steamworks.getAuthSessionTicket()