API開発者ガイド
なんか問題がある?心配しないで、答えは全部ここにいる。
全サイト検索

HTTP Basic authentication with Ragic API Key

You authenticate to the Ragic API by providing one of your API keys in the request. Your API keys carry many privileges, so be sure to keep them secret!

Because when your code accesses Ragic via an API key, it will basically log in as the user of the API key and execute read write as this user. We highly recommend creating a separate user for API key access. This way the API access will not be mixed with a organizational user, which will make the system audit trail much clearer and debugging of your API program much easier.

Authentication to the API occurs via HTTP Basic Auth. Provide your API key as the basic auth username. You do not need to provide a password.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. You must authenticate for all requests.


curl https://www.ragic.com/demo/sales/1\
   --get -d api \
   -H "Authorization:Basic YOUR_API_KEY_GOES_HERE"

Note that the HTTP header name is Authorization, and the value is your API key preceded with "Basic ", Basic with a space at the end, and you may need to modify www to na3, ap5, or eu2 in your URL based on your Ragic account URL.

You can generate your API key in Personal Settings.

Most HTTP clients (including web-browsers) present a dialog or prompt for you to provide a username and password (empty) for HTTP basic auth. Most clients will also allow you to provide credentials in the URL itself.

If for some reason that you are not able to send the API key as HTTP header or basic authorization, you can send the API key as a parameter with the name APIKey. You will need to add this parameter for every single request you send.


curl https://www.ragic.com/demo/sales/1\
   --get -d api \
   -d "APIKey=YOUR_API_KEY_GOES_HERE"

一番上に戻る 目次

無料でRagicを始める

Googleアカウントに登録