Skip to main content
Participant
July 4, 2024
Question

Status 401: "Unauthorized", "message": "Oauth token is not valid"

  • July 4, 2024
  • 1 reply
  • 1646 views

Dear All,

 

I am creating a simple single page mobile app built using SAP MDK which creates a PDF document from .docx template using merge API. However, after recieing the bearer token when I make my call to  

"response": {
                    "status": 401,
                    "statusText": "UNAUTHORIZED",
 
 "text": "{ \"error\": { \"code\": \"Unauthorized\", \"message\": \"Oauth token is not valid\", \"details\": { \"error_code\": \"401013\" } } }\n".
My Code:

 

 
But still I get the unauthorized error. 
Note: The same credentials /token work from Postman and some other Low code no code tools like SAP BUILD Apps. 
 
Best Regards,
Geet
 
    This topic has been closed for replies.

    1 reply

    Raymond Camden
    Community Manager
    Community Manager
    July 8, 2024

    The URL  you are using to make an asset does not seem to match what we've documented here, https://developer.adobe.com/document-services/docs/apis/#tag/Assets, specifically: https://pdf-services-ue1.adobe.io/assets

    Participant
    July 12, 2024

    Hi Raymond,

    Please let me know if I am looking at the wrong place.

    This is what I see here and used the same.

     

    Best Regards,

    Geet

    Raymond Camden
    Community Manager
    Community Manager
    July 12, 2024

    No, use the endpoint get the access token from here: https://developer.adobe.com/document-services/docs/apis/#tag/Generate-Token