Post not yet marked as solved
Hi guys,
I’m
integrating my ERP to Apple GSX API, and I have some doubts.
My customer
sent to my this link (https://eservicecentral.apple.com/),
which I have a successful login.
At this link, I can see swagger documentation, but I don’t have enough
information about the first token.
Googling I saw another link (gsxapi.apple.com) and it seems to be an old API using WSDL, not JSON/RESTFUL.
What is the main URL from API (the newer one)?
How do I authenticate to this API? Where do I get first token? Where I can find documentation about these steps?
I saw a FAQ (https://gsxapi.apple.com/apidocs/prod/html/WSFaq.html), but it says to generate a CSR and use a WSDL API, which I believe is outdated, because “eservicecentral” uses an JSON API.
Do I need to generate a CSR or not for this newer API (json)?
I saw that you have 3 different environments (GSXIT, GSXUT and GSX). Does the newer API have the same sandbox/production environments also? How do I access them? What are the main URLs?
Where I get the correct instruction to connect to “eservicecentral”? API DOCs don’t say much.
I need some help to do my first connection and to understand the
processes I need to follow.
Also, I received this “gsx2.apple.com” to see things at browser.
Are there any other URL’s that I should be aware of?
Post not yet marked as solved
Do we have any api to upload app screenshots and metadata or create experiments with Screenshots and metadata for appstore connect ?
Post not yet marked as solved
I have submitted my app it was reviewed and it is available on appp store now. But the app is not opening after download. It gets stuck at Splash Screen..
Post not yet marked as solved
in memberships comparation table talk about free to use "Sign In..." feature (see screenshot)
How I can get it for my web-site? Secret key for OAuth protocol and domain confirmation.
From Xcode also dont allow to use this feature
Reporting error like a "profile has been member of Developer Team" (my account Personal).
In many cases from blog post which I found talk about free to use.
Post not yet marked as solved
I am sending a user to the apple authentication site where they fill in their apple login information on a form:
const signInWithApple = () => {
const params = {
client_id: Config.APPLE_AUTH_CLIENT_ID,
redirect_uri: 'https://www.example-site.com/auth/apple/',
scope: 'name email',
response_type: 'code',
response_mode: 'form_post',
};
const loginUrl = `https://appleid.apple.com/auth/authorize?${queryString.stringify(params)}`;
window.open(loginUrl, '_blank', `scrollbars=yes, width=520, height=570`);
};
After it has authenticated the user, it redirects the user to the URL that is defined in the redirect_uri property. Then I verify the token and log in the user on my end. That works beautifully.
The problem occurs when, instead of opening the window with the form fields, it opens a sheet at the bottom of the Safari mobile browser to allow the user to use face id. If you follow through with that, it looks like it recognizes your face and closes the sheet but it never redirects the user to my URL page where I log in the user after verifying their token.
Has anybody encountered this? I would love some ideas on how to solve this please!
Post not yet marked as solved
When I try login with apple, get "Invalid web redirect url".
How can I set or update redirect url for my app.
I want to see redirect url that already was set before, but I can't find where I set redirect url.
Post not yet marked as solved
I'm generating reports for a few campaigns with the Search Ads API. I've been running into this problem, where if a campaign is running in multiple countries (in my specific case: ['AR', 'CL', 'CO', 'PE']), I'm unable to find a way to get more granular results. The report only shows that list in the metadata.
So my question is: is there any way to determine how well the ad performs in each country in the list as opposed to seeing the results grouped together?
json payload:
json = {
"startTime": start_date,
"endTime": end_date,
"selector": {
"orderBy": [
{
"field": sort_field,
"sortOrder": sort_order
}
],
"conditions": conditions,
"pagination": {
"offset": offset,
"limit": limit
}
},
"timeZone": "UTC",
"returnRecordsWithNoMetrics": no_metrics,
"returnRowTotals": return_row_totals,
"granularity":granularity,
"returnGrandTotals": return_grand_totals
}
post request:
requests.post("https://api.searchads.apple.com/api/v4/reports/campaigns", json=json, headers=headers)
campaign metadata:
{'campaignId': CAMPAIGN_ID,
'campaignName': CAMPAIGN_NAME,
'deleted': False,
'campaignStatus': 'PAUSED',
'app': {'appName': APP_NAME, 'adamId': ADAMID},
'servingStatus': 'NOT_RUNNING',
'servingStateReasons': ['PAUSED_BY_USER'],
'countriesOrRegions': ['AR', 'CL', 'CO', 'PE'],
'modificationTime': '2021-12-14T23:42:57.281',
'totalBudget': {'amount': AMOUNT, 'currency': 'USD'},
'dailyBudget': {'amount': AMOUNT, 'currency': 'USD'},
'displayStatus': 'PAUSED',
'supplySources': ['APPSTORE_SEARCH_RESULTS'],
'adChannelType': 'SEARCH',
'orgId': ORG_ID,
'countryOrRegionServingStateReasons': {},
'billingEvent': 'TAPS'}
As you can see, there's a list of countries. At the moment, I am unaware of how to break it down into specific countries.
Post not yet marked as solved
I'm having issues simulating a Sign In with Apple in the simulator. After some searching, it seems this has been an issue in the past iOS's but haven't found anything recent (this year 2022).
The turning wheel spins in the simulator and doesn't authorize. Is this a bug still happening? I'm on iOS 15.2
Thanks.
On my client mobile app I perform apple-id authorization and obtain IdentityToken from Apple server.
Now I want to send this IdentityToken (looks like string xJahN102mdPq2jHAiisPsla012nYahKL ) to my application server. And I want to get user's email on my application server via processing this token.
For google (for example) it is plain simple way, I just make a GET request to:
https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=google_identity_token
And in case the token is correct, Google returns JSON with the user's email inside.
What apple server endpoint should I call and what HTTP request should be done (GET, POST, etc) to obtain user's email using IdentityToken ?
Thank you.
Post not yet marked as solved
I'm currently using Log in with Apple and am wondering if Chrome's 3p cookie deprecation will impact any of our user flows. I was reading that for OAuth, SPA background token renewal (iframe) will break, and front-channel logout / session management will break for OIDC--has anyone heard this as well, or of any other user flows that may break?
Should I be concerned and is Apple working on developing any workarounds for breakages? Have they built anything in the past for Safari & Firefox's movement away from third party cookies (not sure if the impact will be the same for Chrome).
Post not yet marked as solved
We are trying to adopt social sign in feature with 'sign in with apple'. We thoroughly went through documents and managed to successfully connect to apple sign in page from our website. However, when a user type in the information necessary to sign in, the id_token and the code in the response sent from Apple's server fail to reach our front end server and display 405 Method Not Allowed error.
We believe this is the issue with the response_mode in the parameter of the link we use when the button('sign in with apple) is clicked. In our case, response_mode is set to form_post to get id_token and the users' email from scope parameter.
It seems the form_post requests using POST method and this is getting blocked by AWS S3 or the CloudFront service that it nests in.
We tried to change the way S3 and CloudFront work and let POST method get in but it seems it is not supported.
What kind of measures can we take when we really need Apple users' email for sign up and sign in feature? It seems form_post mode is necessary if we want the userinfo we need.
Post not yet marked as solved
Hello,
We've stumbled upon the issue with "Sign in with Apple" functionality today. It worked absolutely fine for quite a long time on our dev instances, but today as we've deployed it to production - it stopped working both on dev and prod.
The issue is that idToken doesn't have email field for all the requests except 1 specific email for some unknown reason. Because of this - we cannot identify the user in our database.
We've tried to test with multiple Apple accounts, including the ones we've already used, the ones that were never used for this app and even the absolutely new accounts with no luck (except 1 specific account).
What we do:
Redirect user to authorization page like this: https://appleid.apple.com/auth/authorize?client_id={SERVICE_ID}&redirect_uri={REDIRECT_URI}&response_type=code
After authorization user is redirected to the redirect_uri where we get state and code.
On the server-side of web app we create client_secret signed JWT (as required by documentation) and send POST https://appleid.apple.com/auth/token request with the following data:
{
code,
client_id: result.Item.clientId,
client_secret,
grant_type: "authorization_code",
}
In response we get JSON with "access_token", "token_type", "expires_in", "refresh_token" and "id_token"
We parse "id_token" to get email. Code we use to parse:
const idToken = JSON.parse(body).id_token || "";
const [, infoPart] = idToken.split(".");
const buff = Buffer.from(infoPart, "base64");
const text = buff.toString("ascii");
const json = JSON.parse(text);
if (json.hasOwnProperty("email")) {
endUserEmail = json.email;
}
The issue is that for all accounts we've tested except 1 - there's no "email" field.
We've also tried to use AWS Cognito to verify if this is the issue with our implementation. They specify scope=email%20name&response_mode=form_post in their request. Unfortunately, the result is the same - Cognito returns an error saying that there's no email.
Is it some kind of misconfiguration on our side? What should we do to allow users to sign in with Apple ID?
Thank you,
Dmitrii Khizhniakov
Web developer
Graebert GmbH
https://graebert.com
I'm building a music streaming application using Music Kit JS. The frontend uses Vue and the backend uses Express.
That said I had a few questions. I'm trying to generate a token that can be used with the music player configuration. This is how I have it setup currently:
const mk = await (window as any).MusicKit;
musicKit.value = await mk.configure({
developerToken: "DevTokenExample",
userToken:"userTokenExample",
app: {
name: "Apple Streaming Example",
build: "1.0.0",
},
});
I've omitted my developer token and user token. I'm able to stream music just fine, but it plays "previews" of the songs.
I have a login system setup for Apple OAuth authentication using this process:
https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js
And all that works fine, I can get tokens and everything. I tried using the access_token as the userToken in the music kit configuration and the player still plays the previews of the songs.
I also used the id_token for the userToken to see if that would make a difference and it didn't do anything different, still played the previews.
To clarify, yes the account used is signed up to Apple Music.
Since that didn't work, I then used the "musicKit.authorize()" method which gave me a popup and I was trying to log in like that. Once I added in my 2FA code it just says there was an error connecting and I see in the URL an "UNABLE TO VERIFY JWT".
The few posts regarding that issue don't seem to have any fixes.
My questions are:
Can I use the Sign In With Apple Rest API method shown for the music kit user token?
If I can't use the Rest API method, how do I resolve the JWT error when using musicKit.authorize()?
Post not yet marked as solved
Initially, our application provided the user with SIWA without requesting an email address. A bit later, the user authorization flow was changed and the email area for authorization request was added. However, the updated areas are not reflected in further responses, whether it is a native iOS or a web client. Both give the same result without email in JWT claims until the user manually cancels the authorization of the application from his Apple ID.
Is there another way of getting email from already authorized user except revoking an access to our app?
Post not yet marked as solved
Hello,
I'm having trouble retrieving user info on a SignIn use case. To start authentication process I send a request with a scope param like scope=name email. It is sent URL encoded. However after successful login, I do get the email information in the IdToken along with the sub etc. but the name is never provided, any idea what I'm doing wrong ?
Post not yet marked as solved
Hi,
Any my organization there are many apple products, i am creating an app for organization. in that app barcode scan facility is their, now i am looking for apple api which can provide details after scanning to barcode like Product type, Model number..etc, is there any api available at apple & what is charges for that api.
Thanks,
Yusuf Shaikh
Post not yet marked as solved
Hello fellas,
I wanted to build a website where users can ping my iPhone, but I'm facing some trouble on the back-end side. I was wondering if there is an API for such a thing that would help and save a lot of time.
Note I thought of using Findmyiphone but didn't really get the hang of it, and didn't know how to use it to get what I want
Would love to hear out from you people regarding any thoughts!
Thanks.
Post not yet marked as solved
I am testing the apple server api. Every works fine in the sandbox environment. But when I want to change to url from sandbox to prod environment, I only get 401 unauthorized response.
I am using the same way to generate jwt token in both sandbox and prod. Is the jwt token different in this two environments? Can anybody help me with this problem?
Post marked as Apple Recommended
In the server-side verification link of Sign in Apple ID, we only obtain the public key from the Apple server and verify the JWT validity of the IdentityToken, which is regarded as a successful login. The AuthorizationCode is not further verified and the Token is obtained and saved.
However, at present, Apple requires to request the revoke token when deleting the user. We did not hold the Token before.
Is there no need to request the revoke token interface when the user deletes the account?
Will the APP review fail due to this?
Post marked as Apple Recommended
Apple requires that the delete account operation be provided in the app on June 30. Regarding signinwithapple, the Apple website says that if your app offers Sign in with Apple, you'll need to use the Sign in with Apple REST API to revoke user tokens when deleting an account.
Currently connected to signinwithapple, jwt verification is used in the background, and Apple api is not requested to complete verification, please refer to https://blog.csdn.net/w_monster/article/details/124171787 Method 1: id_token verification.
Question: In this case, to delete the Apple account, do I still need to call Apple's REST API?