Skip to main content

Get Encrypt Ticket (GetEncryptUrl)

AndroidiOSWindowsPS5
If you are using the Unity engine, see GetEncryptUrl in the Unity SDK.

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

UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static FString GetEncryptUrl(const FString Url);

Parameter Explanation

ParametersTypeDescription
UrlFStringLink address

Composition of URL Parameters

Encrypted field encodeparam:

ParameterTypeExplanation
openidFStringPlayer Network SDK user identification
tokenFStringPlayer Network SDK user token
uidFStringThird-party channel OpenID

Non-encrypted fields:

ParametersTypeExplanation
OSFStringClient operating system
1 : Android
2: iOS
3: Web
4: Linux
5: Windows
6: Switch
gameidFStringPlayer Network assigned game ID
channelidint32For information on login channels, see Channel Definition
sdk_versionFStringPlayer Network SDK version
user_nameFStringUsername
tsFStringTimestamp
seqFStringSequence number
info

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

Callback Handling

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

The callback ID is kMethodIDWebviewGetEncryptURL.

Code Sample

FString url = UINTLSDKAPI::GetEncryptUrl("http://www.facebook.com");