sorare / api

Sorare API documentation
154 stars 49 forks source link

OAuth token limit unclear but lower than JWT token limit #276

Open feikede opened 2 years ago

feikede commented 2 years ago

I assume the OAuth token limit should be equal to the JWT token limit. But it seems like the OAuth token limit is equal to the un-auth limit?

curl 'https://api.sorare.com/graphql' \
-H 'content-type: application/json' \
-H 'Authorization: Bearer xxxxxxxxx7SNctYu4rQgsUw3O9rd5t-WNixxxxxxxxx' \
-d '{
    "operationName": "CurrentUserQuery",
    "query": "query CurrentUserQuery { currentUser { paginatedCards(first:10, rarities:[unique, super_rare, rare]) {nodes {slug, onSale, ownerSince, player{age, status{lastFiveSo5Appearances}}}}}}"}'

Replies like

{"errors":[{"message":"Query has depth of 6, which exceeds max depth of 5 instead. Using an APIKEY the limit would be 10."}]}

With a JWT token and JWT-AUD it works.

Please clarify the limits of OAuth - Tokens in the API-Doc. Thanks.

feikede commented 2 years ago

From some experiments it looks like the OAuth depth-limit is 5, while the JWT depth-limit is 10?