question

Rafael Souza avatar image
Rafael Souza asked

How to implement Admob SSV with Playfab

Hey there, how may I integrate Admob Validating Server-Side Verification(SSV) Callbacks with Playfab? it's a way to validate rewarded videos with more safely.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brandon@uprootstudios.com avatar image
brandon@uprootstudios.com answered

We wanted to do something similar, and ended up just using an Azure function app for this. We've gotten it working with Appodeal S2S and Tapdaq S2S, and it should work fine with Admob too.

6 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thiago Lopes Rosa avatar image Thiago Lopes Rosa commented ·

Hi Brandon! I created an Azure function app as you suggested. What is the expected response for a SSV validation? I created the "Hello World" function and I wanted to return success (without any further validation) for testing purposes. What exactly should be returned?

0 Likes 0 ·
brandon@uprootstudios.com avatar image brandon@uprootstudios.com Thiago Lopes Rosa commented ·

@PinkPointer I haven’t used AdMob’s SSV so I’m not sure exactly what AdMob expects as a result, but if you want to simply return 200 OK, you shouldn’t have to do anything. I believe by default, the function should return 200 OK unless it fails or you write custom code to return another HTTP result. For example, we use both TapJoy and Appodeal, both of which require us to return 400 Forbidden if validation fails for any reason.

0 Likes 0 ·
Thiago Lopes Rosa avatar image Thiago Lopes Rosa brandon@uprootstudios.com commented ·

Thank you for the info, I was able to connect with AdMob! One last question, I imagine it is possible to call a cloudscript from within this function (in order to grant the reward), right? Any pointers on how to "connect" and/or have a playfab context there?

0 Likes 0 ·
Show more comments
Show more comments
Citrus Yan avatar image
Citrus Yan answered

Hi @Rafael Souza,

So, the basic flow of the validation you require is the following:

  1. Make Http requests to PlayFab.
  2. The requests trigger the function, which performs the verification.
  3. Send back the result.

Is that right? If that’ the case, I believe PlayFab doesn’t support handling callbacks from other endpoints, it does support making Webhook calls to custom servers to provide additional event handling. You may want to check the solution of using an Azure function app Brandon suggested.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Rafael Souza avatar image
Rafael Souza answered

@Citrus Yan Yeah, Brandon solution seems to be the way, I'll try that but with Amazon Lambda since I already have an account there.

Thank you both.

3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brandon@uprootstudios.com avatar image brandon@uprootstudios.com commented ·

@Rafael Souza Sure thing, if you need help with it let me know although it should be relatively straightforward. I'd also suggest writing a playstream event when the reward is triggered for analytics.

We just make a CloudScript call with the unique event ID, player ID, and currency info and update the currency if the unique ID doesn't match the last unique ID used.

0 Likes 0 ·
Thiago Lopes Rosa avatar image Thiago Lopes Rosa commented ·

Hi @Rafael Souza! Were you able to do the SSV using Amazon Lambda? As I commented on @Brandon Phillips answer, I'm trying to use the Azure Functions. I tried to add my function to the AdMob console, but it is returning a "internal error" when AdMob is verifying the URL. Did you ever get that error?

0 Likes 0 ·
Thiago Lopes Rosa avatar image Thiago Lopes Rosa Thiago Lopes Rosa commented ·

I had to set my function as anonymous and then the AdMob console accepted it! =)

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.