ok I was able to do it with the API
I followed a medium post called "Generating JWT Tokens for App Store Connect API" to get the signed JWT with my api key (apple won't let me link to it)
https://medium.com/xcblog/generating-jwt-tokens-for-app-store-connect-api-2b2693812a35
2) then I went to the download codes link that failed and was able to get the ID from that (copy link address)
e.g https://appstoreconnect.apple.com/iris/v1/subscriptionOfferCodeOneTimeUseCodes/#######/values
(the ###### is the id)
then I was able to make a request
3) > curl -X GET https://api.appstoreconnect.apple.com/v1/subscriptionOfferCodeOneTimeUseCodes/######/values --HEADER "Authorization: Bearer KEY-GENERATED-IN-STEP-1"
which spit out all of the codes
you can add "> codes" to the end of command to write to a file called codes