There are two apps under our account that need to be transferred to other teams, namely A app and B app. Both apps have the function of Apple login. Now we need to transfer the original Apple login user to the new team, and we need to generate a new transfer identifier, i.e. TransferId. We created a new p8 file for each app in the developer background, and then followed the apple document to generate the transfer identifier. A app can be generated normally, but B app cannot be generated, and the error http: 400, { error: 'invalid_grant' }; The process is as follows:
- Generate clientSecret according to the key and p8 file corresponding to the sent teamID and p8 file and clientId, i.e. bundleid. ✅
- Generate accessToken using clientId and clientSecret. ✅
- Generate transfer identifier (auth/usermigrationinfo). This interface reports an error http: 400, { error: 'invalid_grant' }. ❌
Hi @zhanglin1,
You wrote:
[...] A app can be generated normally, but B app cannot be generated, and the error http: 400, { error: 'invalid_grant' }; [...]
The most common reasons for an invalid_grant
errors occur are:
- The user access token was previously consumed or had expired. These tokens are returned in the TokenResponse, are single-use and have a one (1) hour expiration.
- If using the team-generated user access tokens documented here, the access token has a one (1) hour expiration but can be used multiple times.
For additional guidance on troubleshooting errors, please see the following technote:
Cheers,
Paris X Pinkney | WWDR | DTS Engineer