0
は、私は以下のRestClient
を経由して、これを翻訳していないよRubyのポスト基本認証を使用して要求し、複数のデータ
curl -H 'Authorization: Basic ENCODED_CLIENT_CREDENTIALS' --data '[email protected]&password=test&grant_type=password&scope=user%20documents%20user%2Fdocumentsv2' https://api.com/oauth2/token
私のコマンドである私のコードです:
access = RestClient::Request.new(
:method => :post,
:url => 'https://api.com/oauth2/token',
:data => {
:username => 'xxxx',
:password => 'xxxx',
:grant_type => 'password'
},
:headers => {
:Authorization => "Basic some_string",
:'Content-Type' => 'application/x-www-form-urlencoded'
}
)
400の不正なリクエストを表示しています。 誰でもこの翻訳を手伝うことができます。
おかげ
:data => {
:username => 'xxxx',
:password => 'xxxx',
:grant_type => 'password'
},
以下、このライン上の間違った