Skip to main content
Participant
Jul 4, 2024 12:49 PM UTC
Question

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

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 is closed to new replies. Start a new post to keep the conversation going.

    3 replies

    Raymond Camden
    Community Manager
    Community Manager
    Jul 8, 2024 1:51 PM UTC

    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

    Translate
    Participant
    Jul 12, 2024 7:54 AM UTC

    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

    Translate
    Raymond Camden
    Community Manager
    Community Manager
    Jul 12, 2024 4:00 PM UTC

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

    Translate