I'm working with the eBay API and encountering an issue during the OAuth process. I'm trying to receive an access_token through this URL https://api.sandbox.ebay.com/identity/v1/oauth2/token
I'm making a POST with this data (please, also, see the Postman screenshot below):
- Headers:
- Content-Type: `application/x-www-form-urlencoded`
- Authorization: <Base64 encoded client ID and secret>
- Body (x-www-form-urlencoded):
- grant_type: client_credentials
- scope: https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope https:%3A%2F%2api.ebay.com%2oauth%2api_scope%2sell.account
- redirect_uri: <My redirect URL>
After making the POST request, I get the following response:
{
"error": "invalid_scope",
"error_description": "The requested scope is invalid, unknown, malformed, or exceeds the scope granted to the client"
}

You mixed a scope "Authorization Code Grant Type" and " Client Credential Grant Type" even if you assigned "grant_type" is "client_credentials"
Authorization Code Grant Type
Client Credential Grant Type
So have to use same "Client Credential Grant Type" scopes
I demo two same category scopes from "Client Credential Grant Type"
Username and Password copy from your Application Keys (client id and client secret) - the following image.
Client Credential Grant Type
Authorization Code Grant Type