Search Unity

Google Licence Key Verfication: 401 Unauthorized

Discussion in 'Unity IAP' started by falkenbrew, Jun 29, 2020.

  1. falkenbrew

    falkenbrew

    Joined:
    Apr 21, 2020
    Posts:
    146
    I'm using Unity 2019.4.1f1 (and I think I had this problem in the last version too)
    I've been trying to set my licence key from google play developer console but I always get the response: "Please enter the key in a valid format".

    By chance I just noticed I can right click the Services panel and get a dev console, thanks chromium :) ...
    The dev console is showing a 401 error

    1. Request URL:
      https://analytics.cloud.unity3d.com/api/v2/projects/xxxxxxxxxxxxxxxxxxxxxx/set_google_pub_key
    2. Request Method:
      POST
    3. Status Code:

      401 Unauthorized
    this feels like a bug to me.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, this is a known issue. The work around is to enter it on the Analytics Dashboard under project settings.
     
  3. falkenbrew

    falkenbrew

    Joined:
    Apr 21, 2020
    Posts:
    146
    Aaaa, I read something about the dashboard, but it did not say it was in the unity project settings. Thanks.
     
  4. falkenbrew

    falkenbrew

    Joined:
    Apr 21, 2020
    Posts:
    146
    Ok, even that was confusing. For anyone else trying to find the dashboard:
    It is in the Services tab not Unity -> Edit -> Project Settings!

    Services ->Settings->Go To Dashboard -> opens a web panel

    edit:
    Ok, it was even more a pain in the backside than expected. But I got it to work. First thing was I already had cloud build activated, but was using a different name there. After fixing that, I could not find any analytics settings. They were enabled in Unity, but when clicking on Services -> Analytics I saw the button "go to Dashboard" and gave it a go. Only then did Analytics show up in the web interface where I could finally enter my google licence key.
     
    Last edited: Jun 29, 2020
  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Glad it worked for you!