I im following the tutorial found here: https://developers.google.com/google-apps/calendar/quickstart/android
The project compiles and runs however gives the error 403: "access not configured. the api (calendar api) is not enabled for your project."
I have searched around and it seems like for most people it is because they did their package name wrong, however I copied and pasted it directly from the code. I was also wondering why we generate an api key but never copy it into the android project. I found somewhere that the API key can is added to the android manifest like this:
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data android:name="com.google.android.calendar.v2.API_KEY" android:value="MYAPIKEY" />
I have tried v2 as is above and v3 (which i believe is the current version). I have tried generating keys using my keystore and the android keystore, both specifying the app or not specifying any apps.
What is the correct way to add the api key to the project to get rid of this error? or is there something else im doing wrong?
EDIT: the post suggested by multiple people has not solved my problem as I have set it to allow connections from all android applications (same as "any referrer allowed") and it still gives me the error.