I have been using the Youtube Data API v3 for sometime without any issue using HTTPRequest to send request by using Google API Key and URLRead to get the response in Mathematica. But for certain Youtube Data, Google requires OAuth 2.0 Authentication instead of a basic API Key. So I created the credentials online and got the client_secret.json file. Which contains:


All I want is to run the Mathematica's OAuth 2.0 feature to get the token to put in my endpoint URL when sending requests. How do I do that? I can't find anything in documentation in version 12. Maybe it is hidden in some context that I don't know.

Also I want the scope to be "https://www.googleapis.com/auth/youtube".

Looking at Can anyone explain how to use Mathematica's OAuth package?, I have tried the following:




But it opens up the authentication dialog box with link to get the authentication code. On clicking the link, it gives me the following error:

400. That’s an error.

Error: invalid_request

Missing required parameter: scope

So my question is How do I give the scope parameter to the OAuthSigning`OAuthAuthentication function?

  • 2
    $\begingroup$ There's no great way to do this without making a full service connection. You can check out how I did that for YouTube here. $\endgroup$
    – b3m2a1
    Jun 18, 2019 at 5:50


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.