Copy link to clipboard
Copied
The code I am using to generate an access token can be found here.
It is written in Rust, but should be easy enough to follow for non-rustaceans here.
The problem is that Adobe isn't returning a standard response, and also they are returning an error "invalid_target_scope" with description: "None of the requested scopes are both on the client and the binding.".
I am planning on using the Adobe PDF extract API, but I am currently stuck.
NOTE: I am using the "openid, AdobeID and DCAPI" scopes only.
According to our documentation, you don't need the scope at all, just the id and secret.
Copy link to clipboard
Copied
My temp fix: change the token URI to “https://pdf-services-ew1.adobe.io/token” and I swapped out an OAuth client library to just make a direct POST request for fetching tokens, as I got error 400: bad request using oauthlib + oauthlib_requests in Python, which I switched to temporarily assuming something was wrong with the oauth2_async crate in Rust.
Oh well, for now I am using plain POST requests and I hope that serves me well enough.
Copy link to clipboard
Copied
According to our documentation, you don't need the scope at all, just the id and secret.
Copy link to clipboard
Copied
I eventually found that out after re-checking the API docs. This makes it a pain in the ass to use OAuth2 libraries, as Adobe suggests.
Thanks for the reply
Copy link to clipboard
Copied
I have some nodejs samples that work and use scopes. Try setting the scope to...
'openid,AdobeID,read_organizations'