Closed leonkyneur closed 9 years ago
Many thanks, we will adjust it in the next few days!
:+1: thanks
Please give me reply for this error. how to assess remotely and add API keys to the user.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://192.168.254.10/posty_api/api/v1/domains. This can be fixed by moving the resource to the same domain or enabling CORS.
@avinash- does is error occures when you use the webui or directly
no @chicobico when i inspect element in with firebug.
I hosted in digital ocean server i'm unable to add domain as well as users through it. how to add domains when i hosted in live VPS server. ?
@chicobico Please help me out ?
have you already created a initial api_key with
rake api_key:generate
@leonkyneur The Regex now also works with subdomains and domains like example.co.uk. If you still have problems please let us know
when i install in a vps there is a key pre generated. from my system i need access which is deployed in cloud VPS.
@chicobico. where should i generate key in cloud or in my local system ?
To generate a initial key go to the project root on the cloud server (e.g. /home/posty/posty_api) and run
rake api_key:generate
rake api_key:generate RACK_ENV=production
how can i connect to posty from the cloud server ? @chicobico in google-chrome and add domains in it.
have you created the api_key? If you are not sure check your database. The table api_keys should now contain 1 row with a access_token.
S created automatically @chicobico next step ?
Key "afb2e480cbba1a3d92b8ff971b6561cb" found @chicobico
production: api_url: http://192.168.254.10/posty_api/app/api/v1 api_version: v1 access_token: afb2e480cbba1a3d92b8ff971b6561cb
I have seen this.
Browse with Google Chrome to:
http://192.168.254.10:9292/api/v1/api_keys?auth_token=afb2e480cbba1a3d92b8ff971b6561cb
If you started the API with rackup
the port is 9292
If you not startet the API yet start it with rackup
This should output a list with all api_keys
The IP-Address 192.168.254.10 looks like it´s your local ipaddress you must use the ipaddress of the server on which the api runs.
1Q) How many tokens can i generated ? if need to send to the another user to add domains and user shall i should send him whole url ?
@chicobico
You can create as much as you want. You can host the webui on a central place. Or the user uses the webui on workstation then he needs the following:
"servers": [
{
"caption": "posty server 1",
"url": "http://192.168.254.10:9292/api/v1",
"key": "123456"
}
Another option is to use the posty_client on the terminal then he needs the following:
production:
api_url: http://192.168.254.10:9292/api/
api_version: v1
access_token: ask your admin
@avinash- can you access the posty_api now?
@avinash- thanks working as expected
I'm finding the regexp used for validating domain names too strict when using a sub-domain or even some country TLDs.
Examples that fail: mysub.mydomain.com mydomain.com.au mydomain.co.nz etc...
Happy to submit a pull request if required.