question

nicollhunt avatar image
nicollhunt asked

Unable to read api key - only in live version?

Hi, During testing GameCircle initialises correctly and both leaderboards and achievements work correctly. However, when the live version of the exact same app is downloaded from the Amazon AppStore GameCircle fails on startup with: "Unable to read api key. GameCircle requires an api key to be included in assets/api_key.txt. GameCircle will not initialize." The api_key.txt file is definitely in the .apk when I upload it to Amazon, and I am at a loss to understand what changes between submission and the apk going live. Has anyone else seen this?
10 |5000

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

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Nicollhunt, Thank you for writing to us. Currently we see that there is no security profile associated with your application in developer portal. So, GameCircle will not work on any device until they associate the security profile with the application on the Distribution Portal . Please follow the below steps for attaching security profile with the app in distribution portal. 1)Login into developer portal 2)Click on Apps&Services 3)Click on your AppName 4)Under the App name click on security profile Tab 5) Attach corresponding security profile https://developer.amazon.com/sdk/gamecircle/documentation/Publish.html
10 |5000

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

Todd Moore avatar image
Todd Moore answered
Wow that is the answer I've been looking for. Been struggling to get GameCircle integrated (always works fine on test device). I would suggest giving a better log description when security profile has not been linked to the app. I wasted a week on this trying to figure out why GameCircle would work fine on a test device but always failed review. I thought just have a security profile configured to a specific package and app name was good enough... didn't realize you also had to link it in the app listing. Glad I searched the forums. Cheers
10 |5000

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

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Moore, We say this in the first step in our publishing guidelines of an GameCircle integrated app in the Amazon Appstore doc ( https://developer.amazon.com/sdk/gamecircle/documentation/Publish.html#Section0): You must associate your game with a security profile in the Amazon Mobile App Distribution Portal before submitting the game to the Amazon Appstore. If you do not associate a security profile with your game before submitting it, your game will fail on launch. The reason is that when Amazon signs your app (which is the default experience), it generates a new API key that is linked to the game's security profile, rather than to the game itself. However putting better information in the log is also a better idea. Thank you for taking the time to send us your feedback. We will share it with the appropriate internal teams.
10 |5000

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