darrynten / clarifai-php

Clarifai API client for PHP
MIT License
25 stars 15 forks source link

Update for API Keys #44

Closed jaredl531 closed 6 years ago

jaredl531 commented 7 years ago

Hey guys - we just introduced API Keys to replace access tokens. Would be cool to see it in here!

nzsakib commented 7 years ago

Agree , I cannot use the library anymore as I don't have any CLIENT_ID/ SECRET keys.

Please implement the API keys.

eddiezane commented 7 years ago

@darrynten - I started taking a stab at implementing this and saw that we're currently using /v1/token for every request https://github.com/darrynten/clarifai-php/blob/eba32443af8d8b11518d5886a534079638f07437/src/Request/RequestHandler.php#L158-L177

API Keys do not work with this endpoint/session tokens.

We're still finalizing plans but will most likely be moving to dropping v1 support by the end of this year. Also all newly created apps only have API keys (which it seems @nzsakib encountered above).

I see two options:

What are your thoughts?

darrynten commented 7 years ago

@mxnr @vojtik do you guys perhaps have any ideas around this?

darrynten commented 7 years ago

Hi @eddiezane and @jared-clarifai

There is a PR open #46 that lays some groundwork for this, but it breaks backwards compatibility.

On that note, and regarding:

We're still finalizing plans but will most likely be moving to dropping v1 support by the end of this year.

Does this mean that any and all production apps in the wild will be broken come Jan 1 if they are not migrated to API keys, or will they be "grandfathered"?

Keen to get this resolved 🚀

eddiezane commented 7 years ago

@darrynten will take a look at the PR.

Does this mean that any and all production apps in the wild will be broken come Jan 1 if they are not migrated to API keys, or will they be "grandfathered"?

That is all still being discussed and worked out but my gut feeling is we'll be turning off support completely and there will be plenty of notice and an upgrade path.

darrynten commented 7 years ago

Hi all, PR #46 is close to being ready, there are only some minor change requests left.

darrynten commented 7 years ago

@clone1018 I need you to please make the change to #46 so that we can merge this in and release. Thank you.

darrynten commented 6 years ago

This was just resolved!

A new release, 1.0.0 has been published.

Thanks to @jared-clarifai @unclecheese and @clone1018

https://github.com/darrynten/clarifai-php/pull/49