Search Unity

Question Is it possible to give in-game items to players based off of their app store/google play email?

Discussion in 'Android' started by Birdy-Bird, Jun 27, 2022.

  1. Birdy-Bird

    Birdy-Bird

    Joined:
    Apr 18, 2021
    Posts:
    20
    I want to create an email promo where signing up for a newsletter gives you an in-game item. The item is exclusive to the promotion, and not offered as an in-app purchase.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You can certainly email out a code or similar that users then enter into your game. How are you getting the email addresses? You would need to ask the user to provide their email address if you don't have such an email list.
     
  3. Birdy-Bird

    Birdy-Bird

    Joined:
    Apr 18, 2021
    Posts:
    20
    Hi Jeff! I have an email list. Are there any APIs that handle code redemption, or do I have to make my own service for this?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Why do you need a service? Just have a script in your game that would recognize the code the user enters and unlocks the content. Perhaps I'm not fully understanding what you are trying to achieve.
     
  5. Birdy-Bird

    Birdy-Bird

    Joined:
    Apr 18, 2021
    Posts:
    20
    I was just overcomplicating things - your solution seems like it would work perfectly. Thank you so much!
     
    JeffDUnity3D likes this.
  6. Birdy-Bird

    Birdy-Bird

    Joined:
    Apr 18, 2021
    Posts:
    20
    Sorry to bother you again Jeff, but I ran into a problem:

    How do I prevent people who haven’t signed up to the list from using the same codes to get the in-game reward? For instance, if one of the people on the email list shares their code, how can I prevent other people who aren’t on the list from using it? I don't want to put any emails into the codebase due to security concerns.

    My game is on iOS and Android.
     
  7. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You can't stop people from sharing their codes. But if people are sharing their code, isn't your game becoming more popular? Just make sure the code only works once in the game for each person who uses it.
     
  8. Birdy-Bird

    Birdy-Bird

    Joined:
    Apr 18, 2021
    Posts:
    20
    Yes, but those people entering the shared promo code won't be part of my mailing list :confused:. I'd also like to give people better in-app rewards when they refer more people.
     
  9. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Then you will need to use unique codes sent to each person on your mailing list that can only be used once
     
  10. Birdy-Bird

    Birdy-Bird

    Joined:
    Apr 18, 2021
    Posts:
    20
    I'll need a server to handle this, right? Or does Google/Apple give developers a way to keep track of these things?
     
  11. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    It seems to me that you are over engineering this. Don't worry about users giving out codes. If they do, it would be rare, even then you have more users playing your game. Where are you getting your "mailing list", just friends and family? Friends and family aren't going to be malicious. But yes, you'll need a server, and write the code to track the codes. Is it worth it?