codinn / applaud

Python client library for App Store Connect API.
MIT License
23 stars 5 forks source link

Questions about scope #2

Open caimaoy opened 2 years ago

caimaoy commented 2 years ago

I see scope in JWT, but in your code there is nothing about it. I've use swagger to generate the client code, but I cannot invoke POST /v1/devices, while I can invoke GET /v1/devices

swagger_client.rest.ApiException: (405)
Reason: Not Allowed
HTTP response headers: HTTPHeaderDict({'Server': 'daiquiri/3.0.0', 'Date': 'Tue, 24 May 2022 07:57:30 GMT', 'Content-Type': 'application/json', 'Content-Length': '266', 'Connection': 'keep-alive', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'X-Apple-Jingle-Correlation-Key': 'xxx', 'x-daiquiri-instance': 'daiquiri::pv50p00it-hyhk12043901:7987:22RELEASE62:daiquiri-amp-all-shared-ext-001-pv'})
HTTP response body: b'{\n\t"errors": [{\n\t\t"status": "405",\n\t\t"code": "METHOD_NOT_ALLOWED",\n\t\t"title": "The request method is not valid for the resource path.",\n\t\t"detail": "The request method used for this request is not valid for the resource path. Please consult the documentation."\n\t}]\n}'
caimaoy commented 2 years ago

After reading your code, I found that scope is not requeired. But I still don't know how to set the scope of POST /v1/devices.