Reputation: 1
As a part of the Shopware 6 Admin API authentication process, in the first step I'm able to successfully retrieve the access_token via POST call, ex. http://mywebsite.com/api/oauth/token and body
{ "grant_type": "client_credentials", "client_id": "<client-id>", "client_secret": "<client-secret>" }
However, when trying to make any Admin API calls (with authorization Bearer access_token), I get the error:
{ "errors": [ { "code": "9", "status": "401", "title": "The resource owner or authorization server denied the request.", "detail": "Error while decoding from Base64Url, invalid base64 characters detected" } ] }
Typically, the access_token looks like this:
"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJTV0lBQlhOUFROUFVNRkhVQ1VES1YwWExVRyIsImp0aSI6IjBmZDFhNGZmNzY3M2Y4N2E4MjMzYjQxMjljYTlmZjczZTRjN2I1NzM4MGY1MjIzODU1YjYzNDI5OTM1YWNjN2VlY2Y5NzQ3OWViOTM5ODZlIiwiaWF0IjoxNzIzMTIyMDUzLjM4MjAyMywibmJmIjoxNzIzMTIyMDUzLjM4MjAyNiwiZXhwIjoxNzIzMTIyNjUzLjM4MDU5NCwic3ViIjoiIiwic2NvcGVzIjpbIndyaXRlIl19.tAPgX4yREdB3Akab_cfD8xrkM0cpZqoq6dTurMBDLzUg6ilmsbYlYm1jnmua1eu87HxAjqBjRsk1uD7AWykTkAqviq-LsZKqrObY-4bAQmSZCi13_TPMpm64UKsx6mf6Dk6RDiM2VebcTgOhN8xA4KvH5vu66yfnW6I3N-wTO4g24U8BK5J6BDk_R7ef7a2ujMscJadOmx-K6bIp7m2GXseKIb-TGVMcF9X-nWsA83xu3nR5AUojvrVZA3qBNOhWXMAJz-8GwZPVwci4U4QmezIefu0lh_-XVjll-IPtNyY2vhXUdKQGS5de-2sZN98_Y24fSBbB5uIYhwWKyMGJXw"
I tried to base64 decode it to make sense of it, apparently the 3rd part seems corrupt.
Am I missing something here or is Shopware returning a broken access_token?
Upvotes: 0
Views: 136