Skip to content

Server Verification for Reward Video Ad

服务器端验证 (Server-side verification) 是对应用内激励视频广告观看行为进行的额外验证,可规避欺骗客户端回调来奖励用户的行为。您可以使用服务器端验证对每一次激励视频广告观看行为进行验证,每次用户看完激励视频广告之后,Sigmob 都会使用您在设置广告单元时提供的回传网址对此次观看行为进行验证。

Server-side verification is an additional verification of in-app incentive video AD viewing behavior to avoid tricking client callbacks to reward users. You can use server-side validation to verify each incentive video AD viewing behavior, and each time the user watches the incentive video AD, Sigmob will verify this viewing behavior using the return URL you provided when setting up the AD unit.

设置和测试服务器端验证

请完成以下步骤:

(1)前往广告单元页面→ 创建激励视频广告单元;

(2)【服务器回调】开关位于【广告场景】设置的下方,打开开关即开启服务端验证;

(3)设置回调网址与回调参数。

Setting up and testing server-side validation

Complete the following steps:

(1) Go to the AD unit page → Create a Reward Video Ad unit;

(2) The "server callback" switch is located below the "advertising scene" setting. Opening the switch will start the server verification;

(2)Set the URL and parameters of the callback.

使用S2S回调需要填写一些参数信息:

Using the S2S callback requires some information about the parameters:

注意

{} 括号中的值是占位符,当 Sigmob 向您发送回调时,占位符将会被用户的实际数据替换。回调 URL 中 {{USER_ID}}, {{REWARD_NAME}}, {{REWARD_AMOUNT}} 是必填参数;若您需要对 Sigmob 的回调请求进行签名验证,您还需要配置 {{TRANS_ID}}{{SIGN}} 参数

WARNING

{} The values in parentheses are placeholders that will be replaced with the user's actual data when Sigmob sends you the callback. In the callback URL {{USER_ID}}, {{REWARD_NAME}}, {{REWARD_AMOUNT}} is required parameters; If you need to verify the signature of Sigmob's callback request, you also need to configure the {{TRANS_ID}} and {{SIGN}} parameters

  • 奖励名称: 广告单元设置中指定的奖品;例如:金币、积分等。

  • 奖励数量: 广告单元设置中指定的奖励金额;目前Sigmob支持大于等于1的整数值。

  • Security Key: 您在Sigmob变现平台创建激励视频广告单元获取到的密钥。点击"生成",系统会更新密钥。

  • Trans_ID: 交易ID: 由Sigmob生成的已完成事件的唯一标识符,以便您可以验证尚未被奖励用户。

  • Sign: Sigmob生成的 SSV 回调的签名:Sign = sha256(appSecurityKey:Trans_ID)

  • extraInfo: 开发者通过OPTION参数传输给Sigmob服务端生成的 SSV 回调自定义参数

  • REWARD_NAME: The reward specified in the AD unit Settings; For example: gold coins, points, etc.

  • REWARD_AMOUNT: The amount of rewards specified in the AD unit Settings; Currently Sigmob supports integer values greater than or equal to 1.

  • Security Key: The key you obtained to create a Reward Video Ad unit on the Sigmob cash out platform. Click "" Generate " The system will update the key.

  • Trans_ID: Transaction ID: A unique identifier for the completed event generated by Sigmob so that you can verify that the user has not yet been rewarded.

  • Sign: Signature of the SSV callback generated by Sigmob: Sign = sha256(appSecurityKey:Trans_ID)

  • extraInfo: Developer custom parameters for the SSV callback generated by the Sigmob server via the OPTION parameter

参数宏信息:

类型是否必填
{{USER_ID}}string
{{REWARD_AMOUNT}}int
{{REWARD_NAME}}string
{{TRANS_ID}}string
{{SIGN}}string否,若添加 trans_id 后需要同步添加
{{EXTRAINFO}}string

Parameter macro information:

MacroTypeRequired
{{USER_ID}}stringYes
{{REWARD_AMOUNT}}intYes
{{REWARD_NAME}}stringYes
{{TRANS_ID}}stringNo
{{SIGN}}stringNo, if trans_id needs to be added synchronously
{{EXTRAINFO}}stringNo

回调响应

如果回调通过了全部验证且玩家拿到了游戏奖励,开发者需要返回JSON数据: "isValid: true"

字段定义字段值或释义字段类型备注
isValidtrue/falseBOOL开发者服务端收到请求后判断回调结果,返回给Sigmob服务器校验结果。

如果因为网络原因没有收到回调响应,Sigmob会每隔200毫秒重试3次。

Callback responses

If the callback passes all validation and the player gets the game reward, the developer needs to return the JSON data: isValid: true"

Field definitionField value or definitionField typeNote
isValidtrue/falseBOOLAfter receiving the request, the developer server determines the callback result and returns the result to the Sigmob server for verification.

If the callback response is not received due to network reasons, Sigmob retries three times every 200 milliseconds.