How to set the access token myself in the AuthorizationData class?

Vitor Leal 1 Reputation point

I have an AuthorizationData class:

val authData = new AuthorizationData()
  authData.setAuthentication(???) // what do I put here?

I need to set an Authentication class in authData.setAuthentication method. My only option is a OAuthWebAuthGrant:

val oauth = new OAuthWebAuthCodeGrant(clientId, clientSecret, redirectUri)

But the thing is, I don't want that. I just want to put my access token, I don't want the user to go get it; I'll be doing it manually.

Is there any way I can just put my beautiful access token inside this class?


Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
391 questions
0 comments No comments
{count} votes