News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
curl command for requesting access token
Tags: authentication
Apr 26, 2017 at 5:25pm   •   2 replies  •  0 likes
nick-lagerquist

What is the curl command for requesting an access token using Password Flow?

2 Answers
answered on Mar 10, 2022 at 4:48am  

I use below curl request

curl -X POST "https://platform.ringcentral.com/restapi/oauth/token"; \
-H "Accept: application/json" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Basic <base64 of appKey:appSecret>" \
-d "username=<username>&password=<password>@&extension=<extension>&grant_type=password"

Which return error as "OAU-250" : "Unsupported grant type" error


 0
answered on Jul 6, 2019 at 12:00pm  

Here the problem you are facing is the header Authorization which is Basic <base64 of appKey:appSecret> .. If you pass that header in curl, your problem will be solved


 0
answered on Apr 26, 2017 at 5:37pm  
curl -X POST "https://platform.ringcentral.com/restapi/oauth/token" 
-H "Accept: application/json"
-H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Basic <access-token>" -d "username=<user-phone-number>&password=<user-password>&extension=<user-extension>&grant_type=password
Source:
https://developer.ringcentral.com/api-docs/latest/index.html#!#RefPasswordFlow

 1



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us