Ghost url api cors error

I config my ghost website is cmlanche.com, I can request tags by ghost url api, but by subdomain www.cmlanche.com cant, there is cors error

This guide contains the details for how to grant access to external domains:

https://api.ghost.org/docs/ajax-calls-from-an-external-website

Thanks Hannah :slight_smile:

I kown the client id is ghost_frontend, but what is the client secret?

I have insert a record to client_trusted_domains,the client secret is the client id in table below?
domains

but it does not work!

@cmlance Opening multiple threads resulted in them being automatically marked as spam. I have merged them together.

I don’t fully understand your last question about the client secret - this can be found by using the ghost.url.api() helper, or viewing the source of your blog, or in the clients table.

1 Like

I have the same problem. It is bad documented.

@cmlanche you should login to database and type:

mysql> select slug as client_id, secret as client_secret from clients;
+-----------------+---------------+
| client_id       | client_secret |
+-----------------+---------------+
| ghost-admin     | 8cc8cc36fc27  |
| ghost-frontend  | c63d14b0d657  |
| ghost-scheduler | 813e8bbff95e  |
| ghost-backup    | 8aeceb7c4e4a  |
+-----------------+---------------+

I have two feature requests connected with this question.

  1. Add to Admin place where client identifiers and secrets can be showed.
  2. Devote mote attention to document this part.
1 Like