Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. 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
  2.  
  3. access = RestClient::Request.new(
  4. :method => :post,
  5. :url => 'https://api.com/oauth2/token',
  6. :data => {
  7. :username => 'xxxx',
  8. :password => 'xxxx',
  9. :grant_type => 'password'
  10. },
  11. :headers => {
  12. :Authorization => "Basic some_string",
  13. :'Content-Type' => 'application/x-www-form-urlencoded'
  14. }
  15. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement