Skip to main content
Participant
August 24, 2023
Answered

Adobe PDF Extract API fails to generate access token for my scopes: invalid_target_scope

  • August 24, 2023
  • 4 replies
  • 2136 views

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.

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Joel Geraci

According to our documentation, you don't need the scope at all, just the id and secret.

4 replies

Joel Geraci
Community Expert
Joel GeraciCommunity ExpertCorrect answer
Community Expert
August 24, 2023

According to our documentation, you don't need the scope at all, just the id and secret.

j___bAuthor
Participant
August 24, 2023

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

Joel Geraci
Community Expert
Community Expert
August 24, 2023

I have some nodejs samples that work and use scopes. Try setting the scope to...

 

'openid,AdobeID,read_organizations'

 

j___bAuthor
Participant
August 24, 2023

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.