Skip to content
This repository has been archived by the owner on Jul 25, 2019. It is now read-only.

How to get client id and client secret #77

Open
gustawdaniel opened this issue Jan 19, 2019 · 0 comments
Open

How to get client id and client secret #77

gustawdaniel opened this issue Jan 19, 2019 · 0 comments

Comments

@gustawdaniel
Copy link

I want to integrate with depreciated API v0.1 and make CREATE / UPDATE / DELETE operations.

Documentation about authentication is there

https://api.ghost.org/docs/user-authentication

It is enumerated some values that I should know before creating Bearer Token.

  • user email
  • user password
  • client id
  • client secret

I know my user email and password, but in admin panel (ghost v2) I can't find a place where client data are displayed.

I found table clients in the database, but It should be documented, how to find client_id and client_secret because of mapping between these names and database columns names are not obvious.

After logging to the database and typing desc clients i can see:

+-----------------+---------------+------+-----+-------------+-------+
| Field           | Type          | Null | Key | Default     | Extra |
+-----------------+---------------+------+-----+-------------+-------+
| id              | varchar(24)   | NO   | PRI | NULL        |       |
| uuid            | varchar(36)   | NO   |     | NULL        |       |
| name            | varchar(50)   | NO   | UNI | NULL        |       |
| slug            | varchar(50)   | NO   | UNI | NULL        |       |
| secret          | varchar(191)  | NO   |     | NULL        |       |
| redirection_uri | varchar(2000) | YES  |     | NULL        |       |
| client_uri      | varchar(2000) | YES  |     | NULL        |       |
| auth_uri        | varchar(2000) | YES  |     | NULL        |       |
| logo            | varchar(2000) | YES  |     | NULL        |       |
| status          | varchar(50)   | NO   |     | development |       |
| type            | varchar(50)   | NO   |     | ua          |       |
| description     | varchar(2000) | YES  |     | NULL        |       |
| created_at      | datetime      | NO   |     | NULL        |       |
| created_by      | varchar(24)   | NO   |     | NULL        |       |
| updated_at      | datetime      | YES  |     | NULL        |       |
| updated_by      | varchar(24)   | YES  |     | NULL        |       |
+-----------------+---------------+------+-----+-------------+-------+

But with client_id with value id and uuid and cleint_secret with value secret I can't get token and see the response:

401

{"errors":[{"message":"Access denied.","context":"Client credentials were not valid","errorType":"UnauthorizedError"}]}

My question is? It is possible to add a view of client_id and client_secreat in admin? Or type docs about a manner of obtaining these values.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant