You are not authorized to set the license key (891363)


Found some posts saying to do it in the dashboard
I went and added the google license key there:

But it still doesn’t work.
Hoping it didn’t matter, I moved on.
I just get the error:
Required to have a value for transactionName
I’m using IAP Button codeless at this point.

Can you elaborate, “still doesn’t work”? Please share a screenshot of the error. You would be advised not to use Codeless, it has not been updated in some time and is missing key features like receipt validation to fight fraud. Instead, I would recommend that you start with this project, set your own ProjectID, update IAP and publish it straight to Google closed testing with no changes. Get the basics working first. Then apply lessons learned to your own game. Then you have a second test app that you can try out new assets without “breaking” your actual game. https://discussions.unity.com/t/700293/4 and ensure to read the post just after it. This should help also https://docs.unity3d.com/Packages/com.unity.purchasing@4.4/manual/UnityIAPGoogleConfiguration.html

It says, “You are not authorized to set the license key.”
Do I need to resolve this before I can move on?

Screenshot above.

I tried the coded version first. It gave the same errors and issues I’ve reported here, so I figured codeless would be easier for you to diagnose… I’ll switch back to coded.

Have done so… It gives the same error (screenshot above) “You are not authorized to set the license key.”

I have created a new project on Google Play and I’m building the My_Sample_IAP_Project for upload right now.
I’ll add an update as soon as that’s complete, but for now, I want to stress that the original problem “You are not authorized to set the license key.” persists here.

Update… I’m still getting the “You are not authorized to set the license key.”
However, following your sample, the purchase seems to work in-editor.

Your sample generates the following warning:
"Unity IAP: Unity In-App Purchasing requires Unity Gaming Services to have been initialized before use.

  • Find out how to initialize Unity Gaming Services by following the documentation Services Core SDK API
    or download the 06 Initialize Gaming Services sample from Package Manager > In-App Purchasing > Samples."

That seems off. Presumably, I need to initialize that first, but I don’t see it anywhere in the sample.

You already set the license key in the Dashboard, you should not need to set it in the Editor. So when you restart the Editor, that field is still blank? You showed text in your screenshot, how did it get there? I plan to update the sample with UGS Analytics initialization soon, you can use IAP without it for now.

Ok cool.

Yes. Let me boot it up for you and take a new screenshot:
8373123--1103646--upload_2022-8-18_10-28-15.png

From there, I open up my Google Play Dashboard, go get the public key, and paste it in there again:
8373123--1103649--upload_2022-8-18_10-34-31.png

If you set it your Unity Dashboard, it should also show up here. Do not paste anything here under Options. So it’s empty here, correct? After restarting Unity, and setting it as you’ve shown in your Unity Dashboard earlier. And this is for the same project, correct? The Google Dashboard, your Unity Dashboard, and the Services window all have to match the same project.

Here is a screenshot of what it looks like this morning after rebooting. The Unity Dashboard has it in there, and the project is set up on Google Play.
8377395--1104441--upload_2022-8-20_9-18-25.png

“…same project…” I have 3 projects at this point as I work through this. (The main point of the effort is to provide an example for my mobile games class.)

The project seems to work this way. I’ve uploaded to Google Play, installed, and I am able to purchase items with the test card. So it does work even with this error.

Interesting, I don’t see this error. Are you using the CrossPlatformValidator for receipt validation? What version of Unity are you using?

I get the same error. I’ve gotten it before and after searching the forum, I remembered that it was solved this way:
Go into analytics in unity dashboard and adjust it.
But now you can not go into analytics, writes that I must first buy something. And I’m stumped.
Unity - 2021.3.0f1
Purchasing - 4.5.0

Hi Jeff,
I am using Unity 2021.3.10f1 version. I have the same error. In this before, i was using Unity 2019.x version i can successfully setting up IAP. But i cannot now. I transfered my older projects via Plastic SCM to my Unity 2021.3.10f1 my old projects successfully setting up IAP. But when i start a new project on this Unity version, this error comes up ( as screenshot from above ). I am setting up from Unity dashboard my Google Licence key, but i cannot do it in Editor. I restarted tons of times the Editor, even of i tried 1 or 2 days but still says “There was an error checking server for existing key”. I think Editor could not get key from Server so that way we cannot setting up in Editor. What we could to do ?

Hi, I also had this error when I was using Unity 2021.3.6f1. I’ve already tried many different options, but only switching to a different version helped. I installed Unity 2021.2.10f1 and everything worked. That’s why you get an error in the Unity version itself. I hope this helps you.

This thread is now closed. Feel free to reach out via a new thread if you encounter further issue.
Thanks!