Error Getting API OAuth2 Token

Julie.D.3227
Julie.D.3227 Posts: 4 🔍
Hello, I am suddenly not able to generate an OAuth2 Token using Postman for the D2L Brightspace Datahub API. The login popup is constantly redirecting to an Unsupported Browser page with the message:

"Sorry, but Apple Safari version 0 is no longer supported.
Older browsers are slower, less secure, and don't support our latest features."

We are using a Windows Machine with updated browsers. I am stumped as to why we are now stuck on this page and not able to get an OAuth Token to to work with the API. Any suggestions would be great. The Authorize using browser option is not working either, and giving an invalid_request/Invalid Redirect_URI when using the required Postman callback URI.

Has anyone had a similar issue and know of a workaround or fix?
Tagged:

Answers

  • Johnny.B.962
    Johnny.B.962 Posts: 81

    @Julie.D.3227,

    I actually just experienced this myself as well. Here's what I found worked instead. In the section of Postman to obtain a new token, select the checkbox for Authorize using browser. This will cause the Callback URL field above it to have a new address (https://oauth.pstmn.io/v1/callback). You'll want to take that address and modify the Redirect URI that is within Brightspace for the OAuth 2.0 connection with that address. After doing so, when trying to get a new token, it should launch the authentication to go in whatever your default browser is on your device, rather than Postman's internal browser.

    I hope that helps!

    -Johnny
    D2L LAM

  • Julie.D.3227
    Julie.D.3227 Posts: 4 🔍

    I appreciate the help, but I am not quite there. The "take that address and modify the Redirect URI that is within Brightspace" instruction is throwing me for a loop. I checked the Authorize using browser and the default callback changes as expected. Can you explain that a little more, as far as what specifically to modify to get the correct Redirect URI?

    I am likely way overthinking this.

    Thank you!
    - Julie

  • Johnny.B.962
    Johnny.B.962 Posts: 81

    Not a problem. Within Brightspace, if you go to the Manage Extensibility tool and go to your OAuth 2.0 connections:

    There you can edit your connection with Postman by selecting the name of your app, and selecting the Edit button on the page where it will give all the app details. There is a Redirect URI field for the connection, and it is there that you'll want to add the new address that was generated from Postman for "Callback URL" (https://oauth.pstmn.io/v1/callback) that I stated before.

    The Callback URL from Postman and the Redirect URI in Brightspace should match so that when you try to get your initial token, Postman knows where to try and launch the authentication (in a separate browser) and Brightspace will know where to send your token back to.

    Then once you've got that set, then you should be able to get a new token in Postman without issue.

    -Johnny
    D2L LAM

  • Julie.D.3227
    Julie.D.3227 Posts: 4 🔍

    This makes great sense, thank you. My current account does not give me access to anything except Data Hub within Brightspace, so I do not see any of these options. That is the piece I am missing, Your instructions are extremely helpful, thank you!

    -Julie

  • Johnny.B.962
    Johnny.B.962 Posts: 81

    Ah, that does make sense then. Well pass this information along to your local LMS/Brightspace administrator who does have permissions to see the pages I mentioned and they should be able to take care of that for you, and then you should be all set. Good luck!

    -Johnny
    D2L LAM