Skip to main content
Known Participant
December 7, 2021
Question

Adobe Document Generation is failing me. It is saying I do not have Oauth Token when I do

  • December 7, 2021
  • 2 replies
  • 1761 views

The script works perfectly fine on PostMan it also use to work fine a couple of months ago but now I am getting an error. 

I posted my script to stack overflow. Maybe Adobe is not allowing my domain to make request? Or am I missing something? I use cpanel just FYI.

 

https://stackoverflow.com/questions/70255334/php-curl-saying-oauth-token-is-missing-when-it-is-not

This topic has been closed for replies.

2 replies

Known Participant
December 30, 2021

Someone please help

If you ain't First, you're Last - Ricky Bobby
Raymond Camden
Community Manager
Community Manager
December 7, 2021

The token needs to be regenerated - I believe every 24 hours. Your code should be doing that first, then making the call.

Known Participant
December 7, 2021

Thank you for taking the time to respond.

 

I request a bearer token with each call to the service. I didnt put that curl request on here but I pull the bearer token from my initial request everytime and place it in the bearertoken variable. Then put that variable in the header. 

I have made calls to this service without issue in the past. I think Adobe must be blocking my domain? Or something, I check the error logs and dont see anything on my end. I used the exact same request previously and it worked flawlessly. Maybe I am blocked from making API calls? However that doesnt really make sense either because I can request bearer token without issue with my generated JWT token from adobe.io. 

 

I am just confused. Why does Postman work but not the same code I copied to my service? Do I need to put another Curl request? Or maybe I am missing a header that is causing my issue. Or am I using an outdated json format call that now throws an error? 

 

Again, when I put the Curl Headers before the body of the curl it checks my tokens and verifies them. Then it throws a 500 error. However when I put headers behind body of post fields I receive a  40310 error stating I am missing my bearer token. It is confusing to say the least. 

If you ain't First, you're Last - Ricky Bobby
Raymond Camden
Community Manager
Community Manager
December 7, 2021

Nah, we wouldn't block your domain, and if your trial had expired, you would get an error saying as such. Unfortunately I don't know PHP so I can't tell you what possibly could be going wrong.