Skip to content

Conversation

@oshliaer
Copy link
Contributor

Some auth process don't require an authorization token header. It's strange. But there is a way to use the library. For this it's needed to setup client_id and client_secret as parameters.

 .setParam('client_id', CLIENT_ID) .setParam('client_secret', CLIENT_SECRET)
Copy link
Contributor

@erickoledadevrel erickoledadevrel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! Just a few small changes.

function run() {
var service = getService();
if (service.hasAccess()) {
console.log(service.getAccessToken());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this debugging line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't understand why is no-console of lint not raised.

var service = getService();
if (service.hasAccess()) {
console.log(service.getAccessToken());
var url = 'https://api.ritekit.com/v1/stats/multiple-hashtags?tags=php&access_token=' + service.getAccessToken();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: It looks like the API supports passing the access token in the header as well, which is what we show for most samples. Worth doing that here as well for consistency?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've wrote to their support about this and I'm still waiting.

In my case I was need to use this as a module over a common system.

Let's waiting them.

I don't think that is a good example too.

2 days please.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs here say that the header should work: https://ritekit.docs.apiary.io/#introduction/options-for-authorizing-api-calls (see option B).

@oshliaer oshliaer mentioned this pull request Aug 23, 2018
@oshliaer
Copy link
Contributor Author

Ok. This feature can not be applied now. I talked to the developer and he suggests using only the client_id. And this is not a part of this library.

@oshliaer oshliaer closed this Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants