Apple企业伙伴Feed缺少电影捆绑数据,或者我漏了什么?
创始人
2024-09-10 19:30:43
0

确保您的Apple企业账户已购买了电影捆绑包,如果还是无法获取到数据,可以尝试重新注册和生成凭证。以下是Python示例代码:

import jwt
import requests
import time

# Replace with your values
jwt_key_id = ""
team_id = ""
app_bundle_id = ""
private_key_path = ""

# URL to obtain a token from
jwt_token_url = "https://appleid.apple.com/auth/token"

# Time the JWT is generated
time_now = int(time.time())

# JWT header
jwt_headers = {
    "alg": "ES256",
    "kid": jwt_key_id,
    "typ": "JWT"
}

# JWT Payload
jwt_payload = {
    "iss": team_id,
    "iat": time_now,
    "exp": time_now + 86400 * 180,
    "aud": "https://appleid.apple.com",
    "sub": app_bundle_id,
}

# Load Private Key and sign JWT
with open(private_key_path, "r") as private_key_file:
    private_key = private_key_file.read()

jwt_token = jwt.encode(jwt_payload, private_key, algorithm="ES256", headers=jwt_headers)

# Request Access Token from Apple's Authentication Server
r = requests.post(
    jwt_token_url,
    data={
        "client_id": team_id,
        "client_secret": jwt_token,
        "grant_type": "client_credentials",
    },
)

token_data = r.json()

# The actual request to the API
response = requests.get(
    "https://api.appstoreconnect.apple.com/v1/apps/{}/appStoreVersionRelationships".format(app_bundle_id),
    params={
        "include": "bundle,merchandisedVersions,app",
    },
    headers={
        "Authorization": "Bearer {}".format(token_data["access_token"])
    },
)

print(response.json())

相关内容

热门资讯

热门推荐!微信小程序多功能辅助... 热门推荐!微信小程序多功能辅助,盛世辅助器,详细app(有挂神器)1、实时微信小程序多功能辅助透视辅...
最新技巧!黑科技微乐小程序辅助... 最新技巧!黑科技微乐小程序辅助器免费,随意玩工具箱辅助器,详细教程(真是有挂)1、点击下载安装,黑科...
盘点十款!乐乐围棋入门辅助,小... 盘点十款!乐乐围棋入门辅助,小程序游戏赴沪期,详细app(有挂教学)1、首先打开小程序游戏赴沪期辅助...
实操分享!新超凡手游辅助,雀友... 实操分享!新超凡手游辅助,雀友会广东潮汕麻雀万能辅助器,详细挂(有挂教程)1、全新机制【雀友会广东潮...
一起来探讨!纳祥游戏脚本,微信... 一起来探讨!纳祥游戏脚本,微信小程序辅助工具,详细攻略(有挂解惑)1、这是跨平台的微信小程序辅助工具...
一分钟揭秘!新八戒辅助,挂是真... 一分钟揭秘!新八戒辅助,挂是真的假的,详细器(确实有挂)1、全新机制【挂是真的假的ai辅助工具激活码...
最新通报!微信小程序微乐房间怎... 最新通报!微信小程序微乐房间怎么开挂,打哈儿床将辅助最新,详细软件(有挂技巧)1、全新机制【微信小程...
玩家实测!欢乐达人暗堡破解,赣... 您好,欢乐达人暗堡破解这款游戏可以开挂的,确实是有挂的,需要了解加去威信【136704302】很多玩...
一分钟揭秘!情怀手机麻将辅助器... 一分钟揭秘!情怀手机麻将辅助器,功夫川麻辅助,详细工具(详细教程)1、金币登录送、破产送、升级送、活...
今日科普!微信广东雀神挂件辅助... 今日科普!微信广东雀神挂件辅助,对战互娱辅助系统,详细神器(有挂规律);1、下载好微信广东雀神挂件辅...