Google IAP verification with 403 error in Unity. How can I solve this problem? - unity3d

I use Unity.
I used publisher company's verification function.
So, I don't know that function's code.
(But they says it works fine)
I sent json like this (Only google purchase receipt data)
"purchaseData": {
"orderId": "GPA.0000-0000-0000-00000",
"packageName": "com.aaaa.bbbbb",
"productId": "cash_1100",
"purchaseTime": 1234567891234,
"purchaseState": 0,
"purchaseToken": "~~~~~~~~~~",
"acknowledged": false
}
But response is here.
"error": {
"code": 403,
"message": "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.",
"errors": [
{
"message": "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.",
"domain": "androidpublisher",
"reason": "projectNotLinked"
}
]
}
How can I solve this problem?
Please teach me...
ps.
My English is not very good.

Related

Facebook API Lead retrieval for internal business app should i submit for App Review

I am building a dedicated CRM solution and it is supposed to show the list of Facebook leads of the client and then convert manually it to internal lead . I am managed to setup a websocket client and Facebook is sending me lead details including leadgen_id.
{
"object":
"page" ,
"entry": [{
"id": "*****" ,
"time": 1627211279 ,
"changes": [{
"value": {
"form_id": "******" ,
"leadgen_id": "******" ,
"created_time": 1627211277 ,
"page_id": "******"} ,
"field": "leadgen"}
]}
]}
Then i have created an user access_token using Facebook's graph api and requested for the details of the leadgen_id using api endpoint
https://graph.facebook.com/v11.0/<LEADGEN_ID>?access_token=<ACCESS_TOKEN>
I was able to get the details of the test lead I created with the Facebook 's lead testing tool. But when accessing the production leadgen_id I am getting an exception with following as response.
{
"error": {
"message": "Unsupported get request. Object with ID '<LEADGEN_ID' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "*********"
}
}
Then I have tried using a system user token and its not even working for the test leads. In some part of documentation it is saying that I need to complete App review to access live data using lead_retrieval and in some other part of documentation its quoted that I don't need app review to use API for internal users . And I don't get the point of creating a 'login with Facebook' for this internal app specific for one user .
Is there anyway other way than completing app review to access lead details using leadgen_id ?
Its turns out I need to complete the app review specifying it as a 'Server to server app' on the review description, which doesn't need any Login with facebook button . Got the idea from https://developers.facebook.com/docs/app-review/resources/sample-submissions/server-to-server/

What is the minimum setup to post an Ad using Facebook Marketing API?

We need to integrate with Facebook Marketing API for a simple workflow. A user should be able to login to the app with Facebook and allow us to post ads on their behalf.
It seems simple, however we are hitting a strange bug while creating an AdSet. While performing a correct call:
curl -i -X POST \
"https://graph.facebook.com/v8.0/act_XXX/adsets/?status=PAUSED&optimization_goal=REACH&daily_budget=10&name=Test%20Ad%20Set&campaign_id=XXX&targeting=%7B%22geo_locations%22%3A%7B%22countries%22%3A%5B%22US%22%5D%7D%7D&end_time=2015-03-12%2023%3A59%3A59-07%3A00&access_token=<access token sanitized>"
With token permissions:
{
"perms": [
"ads_management",
"ads_read",
"public_profile"
],
"user_id": XXX,
"app_id": XXX
}
and with POST payload:
{
"status": "PAUSED",
"optimization_goal": "REACH",
"daily_budget": "10",
"name": "Test Ad Set",
"campaign_id": "XXX",
"targeting": "{\"geo_locations\":{\"countries\":[\"US\"]}}",
"end_time": "2015-03-12 23:59:59-07:00"
}
We get a response reading:
{
"error": {
"message": "An unexpected error has occurred. Please retry your request later.",
"type": "OAuthException",
"is_transient": true,
"code": 2,
"fbtrace_id": "AUV0_CHdqPNtGuqNd-ZHCW6"
}
}
This seems like a bug on FB side, however, they seem have a track record of returning this message when something is wrong with a request or permissions. While we are waiting for their support response, I am wondering if something could be wrong on our side.
The app is pretty bare bone right now, and we are playing only with the Graph Explorer tokens. Should we go through some review process to get rid of the error? Posting ad campaigns works correctly, so this is even stranger.

"projectNotLinked" Error When Making API Calls

We recently started to receive the following error when calling Google Apis.
Sample EndpointL https://www.googleapis.com/androidpublisher/v3/applications/{packageName}/reviews
{
"error": {
"code": 403,
"message": "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.",
"errors": [
{
"domain": "androidpublisher",
"message": "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.",
"reason": "projectNotLinked"
}
]
}
}
We have since linked our Google Play account to the Google Api account however the error has remained. We have also tried updating the description of an in-app subscription as some other posts had success with that work around but it has not been successful.

Facebook graph page/post insights - permissions error

I have 2 facebook pages where im admin on, lets call them page_a and page_b
if i run this for page_a it works as expected:
HTTP GET -> {PAGE_A_ID}/insights?metric=page_fans_country
{
"data": [
{
"name": "page_fans_country",
"period": "day",
"values": [
{
"value": {
"AR": 4,
"AT": 13,
"AU": 7,
"BE": 16,
....
the page access token i use have the following scopes: read_insights, manage_pages, pages_show_list and public_profile
but when i then try to query details about a post i get this
HTTP GET -> {PAGE_A_ID}_{PAGE_A_POSTID}/insights?metric=post_impressions,post_impressions_unique,post_video_views,post_video_views_unique&period=lifetime
{
"error": {
"message": "Permissions error",
"type": "OAuthException",
"code": 200,
"error_subcode": 1504029,
"is_transient": false,
"error_user_title": "User doesn't have enough permissions to load insights",
"error_user_msg": "You do not have enough permission to view the metric.",
"fbtrace_id": "..."
}
}
it works when i do the same for page_b
HTTP GET -> {PAGE_B_ID}_{PAGE_B_POSTID}/insights?metric=post_impressions,post_impressions_unique,post_video_views,post_video_views_unique&period=lifetime
{
"data": [
{
"name": "post_video_views",
"period": "lifetime",
"values": [
{
"value": 0
}
],
....
the page access token for page_b has same scopes as the one for page_a
I can see all the numbers in facebooks UI, but i cant not access it via the API, anybody had similar issues before?, im stuck and dont know where to go from here.
All above code have been ran in the Facebook Graph Explore, with newly generated tokens.
Any inputs on where to go from here are appreciated.
As mentioned in a comment by #xuantuan58 this seems to be a bug in the FB API.
https://developers.facebook.com/support/bugs/301627877187448/
And may also be related to this bug report: https://developers.facebook.com/support/bugs/2380273985356980/
I have noticed it is only occurring on certain users & pages but as of yet am unable to see a pattern. Sometimes an error will not be returned by the API and instead just an empty data array. If you think there should be data in the response try using the graph explorer tool as I've found that will sometimes give better error responses.
https://developers.facebook.com/tools/explorer/
UPDATE: This issue has now been marked as resolved by Facebook. I have been testing and found this issue has indeed been fixed.
We got the same issue a couples day ago. After playing with scopes we found that if business_management scope is grant then we got the data. But clearly, from its document business_management is not required for reading Page Insights. Hopefully, there is someone has better insights

Facebook Marketing API - Creating an Ad in development mode

I'm implementing an application using Facebook Marketing API's SDK (python), I'm a newbie to this, yet I read the documentation and I was able to create campaigns, and ad sets. But not for ad creatives. The error was that my app is in dev mode and I need to switch it to be public.
Status: 400
Response:
{
"error": {
"message": "Invalid parameter",
"type": "OAuthException",
"code": 100,
"error_subcode": 1885183,
"is_transient": false,
"error_user_title": "Ads creative post was created by an app that is in development mode",
"error_user_msg": "Ads creative post was created by an app that is in development mode. It must be in public to create this ad.",
"fbtrace_id": "Dxgr83ugqSu"
}
}
Once I did, another error occurred stating that an extended permission should be granted:
Status: 403
Response:
{
“error”: {
“message”: “(#294) Managing advertisements requires an access token with the extended permission for ads_management”,
“type”: “OAuthException”,
“code”: 294,
“fbtrace_id”: “HZ8N55VciZg”
}
}
What I did understand is that I need to submit my app for review before trying to push the ad. However, I was wondering if it is possible by anyway to push an ad without doing so? for the sake of testing my script?
Note: it is the same case for sandbox mode.
apologize if this sound like a naive question.