I has api keys, but when i request appstore connect api, it return 401 NOT_AUTHORIZED.
payload = {
'iss': '***-xx',
'exp': int(time.time()),
'aud': 'appstoreconnect-v1'
}
header = {
'alg': 'ES256',
'kid': '***'
}
This is the response.
{
"errors": [
{
"status": "401",
"code": "NOT_AUTHORIZED",
"title": "Authentication credentials are missing or invalid.",
"detail": "Provide a properly configured and signed bearer token, and make sure that it has not expired. Learn more about Generating Tokens for API Requests https://developer.apple.com/go/?id=api-generating-tokens"
}
]
}