Posts

Post not yet marked as solved
5 Replies
What I do to get my JWT: I am using a Python Library (authlib) to generate my JWT. import datetime from authlib.jose import jwt def main(): header = { 'alg': 'ES256', 'kid': '##########', 'typ': 'JWT' } payload = { 'iss': '################################', 'aud': 'appstoreconnect-v1' 'exp': int(datetime.datetime.now().timestamp()) + 1200 # token good for 20 min, as per https://developer.apple.com/go/?id=api-generating-tokens } key = open('AuthKey_##########.p8', 'r').read() token = jwt.encode(cls.header, cls.payload, key).decode('utf-8') print(token) if __name__ == '__main__': main() I then use that token in a form similar to 'Authorization: Bearer $token' in a GET.