Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- curl -H 'Authorization: Basic ENCODED_CLIENT_CREDENTIALS' --data 'username=user@test.com&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'
- }
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement