Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by freelancegordon · Feb 23, 2017 at 05:11 PM · CloudScript

Cloudscript and receiving a callback from Mopub's Rewarded Video Ads

Hi guys,

I'm looking into setting up a server-side callback from Mopub for when a user watched a rewarded video ad, but I'm having trouble working out how to construct the URL.

Mopub only gives you a box to enter a URL in, inside of that I have to designate everything described in the post request in the documentation

POST https://{{TitleID}}.playfabapi.com/Server/ExecuteCloudScript
          Content-Type: application/json
          X-SecretKey: <title_key_value>{
  "PlayFabId": "1337D00D",
  "FunctionName": "levelCompleted",
  "FunctionParameter": {
    "level": 3,
    "points": 400
  },
  "RevisionSelection": "Live",
  "GeneratePlayStreamEvent": true
}

This makes sense, mopub provides a way of injecting variables so I can pass through the player id, the name of the currency and the amount of currency I want to award, but I'm a bit stuck on how I need to actually format the URL itself from the above post request so that I can call the cloudscript function and pass the data through.

Thanks in advance for any help!

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Feb 23, 2017 at 07:50 PM

Well, to do it that way, you'd need to have the Secret Key entered into their setup as a Header on the POST message. From a quick review of their documentation, it would appear that they don't provide a way to do that (and I would advise against it at any rate, since exposing your Secret Key outside your team is extremely risky at best), but rather use their verifier hash system for security.

We recently introduced a beta for rewarded ads that you may want to try, as well. We're adding people to it as we get feedback from the first wave of folks testing it. The way rewarded ads work, you're able to define a reward in PlayFab which is similar in many ways to our random result tables, and use it to grant players VC/items when they have completed viewing ads. We'll be integrating ad partners for full ad mediation and securing the rewards post-GDC, but if you'd like to try the beta, please open a ticket with us on this page (or email us at devrel@playfab.com).

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    1 Person is following this question.

    avatar image

    Related Questions

    MySQL access from cloudscript 2 Answers

    If I use Photon AppId registered in www.photonengine.com, can I use webhook to call CloudScript Func? 2 Answers

    Any way to get the actual definition of Bundle contents? 1 Answer

    CloudScript fails when accessing URL property in object 1 Answer

    CloudScript Windows10 5 Answers

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges