• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Explorer ,
Dec 06, 2021 Dec 06, 2021

Copy link to clipboard

Copied

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

If you ain't First, you're Last - Ricky Bobby
TOPICS
Document Generation API

Views

894

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 07, 2021 Dec 07, 2021

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 07, 2021 Dec 07, 2021

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 07, 2021 Dec 07, 2021

Copy link to clipboard

Copied

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 29, 2021 Dec 29, 2021

Copy link to clipboard

Copied

Can you please have someone at Adobe that understands PHP run a test code with the Curl command above? You can even run it using my client ID/credentials. I have tried every which way to get this code running. I was able to use the service previously, but even on my old code it is not working anymore. I do not understand at all. Please and thank you. Your team can reach out to me at anytime using the phone number on file. As you know, php is a widely used coding language so if there is a bug with the API which I am guessing there is, their could be a lot of different individuals running into the same issue. 

If you ain't First, you're Last - Ricky Bobby

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 30, 2021 Dec 30, 2021

Copy link to clipboard

Copied

A few things. Have you tried the Postman collection, and can you verify your PHP calls includes the same headers, values, etc?

 

Have you shared your PHP code? I don't see it. 

 

Lastly, Adobe is on a winter break so responses will be slow. I'm not back till next Tuesday, but can possibly tke a quick peek.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 30, 2021 Dec 30, 2021

Copy link to clipboard

Copied

The link to stack overflow in the intial post shows the code. 

My php code is copied from the Postman collection after successful calls. 

 

Let me know your thoughts.


Thank you,

If you ain't First, you're Last - Ricky Bobby

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 04, 2022 Jan 04, 2022

Copy link to clipboard

Copied

Unfortunately I really don't have much to add. I do see this in your PHP code:

  'x-api-key: API KEY',

I assume you have a real key there, not a hard coded variable. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 04, 2022 Jan 04, 2022

Copy link to clipboard

Copied

LATEST

Yes I removed the actual API Key from stackoverflow post. 

 

Thank you for trying!

If you ain't First, you're Last - Ricky Bobby

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 29, 2021 Dec 29, 2021

Copy link to clipboard

Copied

Someone please help

If you ain't First, you're Last - Ricky Bobby

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources