Skip to main content

Get Encrypt Ticket (GetEncryptUrl)

AndroidiOSWindowsPS5
If you are using Unreal Engine, see Unreal Engine SDK's GetEncryptUrl.

Gets encrypted ticket.Encrypts the specified URL, adds login status information, and returns the encrypted URL.This is a synchronous interface, no need to obtain the result in the callback.

Use Case

GetEncryptUrl is mainly used to open the marketing event webpage and pass the login status to the webpage.The game calls the interface and inputs the original URL, returning the encrypted URL with login status.Users open web pages through the interface of the OpenUrl web view module.URL with additional parameter encodeparam will be passed to the backend API interface to obtain login status information.

info

The GetEncryptUrl interface requires login to return information on gameid and channelid.

Example of Encrypted URL:

https://www.youtube.com/?gameid=11&os=1&ts=1597840414&version=0.1.000.0001&seq=11-42e0e9d2-2f0e-4b01-a1ab-6831cf9b6165-1597840414-11&encodeparam=4060E2A762B31B8B57A8D5A9BBAF10E8657A5A3A285B0DA7159417C2D6F0D801

Function Definition

public static string GetEncryptUrl(string url);

Parameter Explanation

ParametersTypeDescription
urlStringLink address

Composition of URL Parameters

Encrypted field encodeparam:

ParametersTypeExplanation
openidstringPlayer Network SDK user identification
tokenstringPlayer Network SDK user token
uidstringThird-party channel OpenID

Non-encrypted fields:

ParametersTypeExplanation
OSStringClient operating system
1 : Android
2: iOS
3: Web
4: Linux
5: Windows
6: Switch
gameidstringPlayer Network assigned game ID
channelidintFor login channels, please see Channel Definition
sdk_versionStringPlayer Network SDK version
user_namestringUsername
tsstringTimestamp
seqstringSequence number
info

The above fields do not need to be input; they can be obtained after Player Network SDK login.

Callback Handling

The callback interface is WebViewResultObserver.
The callback data structure is WebviewResult.

Callback ID is INTL_WEBVIEW_GET_ENCRYPT_URL.

Code Sample

string url = INTLAPI.GetEncryptUrl(MY_WEBVIEW_URL);