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
Where do I put the access_token when calling a RingOut API?
Tags: ring out, rest api
Aug 23, 2020 at 12:23pm   •   1 replies  •  0 likes
Tammy Wolski

I am using Password Flow to obtain an access token. This API call works. I can get a token. Now I need to call a RingOut. I have used all the same credentials (user name, password) as the API call to get a token, however I keep getting the response : "Invalid Authorization header":

I suspect this is because I am not including the access token in the URL, header, or params.

If you could give me an answer with respect to Postman, then I could translate that to my "real" app which is built in Lazarus.

Note: The phrase <redacted> is text that may contain sensitive information that has been removed

Note: "callerId" and "from" I assume is the same phone number... which is my dev sandbox account ?


So my question is: Where in Postman do I put the access token in the RingOut API call (URL, header, or params)?


Sent:

POST /restapi/v1.0/account/<redacted>/extension/101/ring-out HTTP/1.1

Content-Type: application/json

Content-Length: 412

Host: platform.devtest.ringcentral.com

Accept: application/json

User-Agent: Mozilla/3.0 (compatible; Indy Library)

Authorization: Basic <redacted>

from=<redacted>&to=<redacted>&callerId=<redacted>&country=Canada&playPrompt=true

Rcvd:

HTTP/1.1 401 Unauthorized

Server: nginx

Date: Sun, 23 Aug 2020 19:11:19 GMT

Content-Type: application/json

Content-Length: 175

Connection: keep-alive

WWW-Authenticate: Bearer realm="RingCentral REST API"

RCRequestId: 6d08a760-e574-11ea-b010-005056bb81b6


{

"errorCode" : "AGW-402",

"message" : "Invalid Authorization header",

"errors" : [ {

"errorCode" : "AGW-402",

"message" : "Invalid Authorization header"

} ]

}


1 Answer
answered on Aug 24, 2020 at 1:27am  

Authorization : Bearer <access_token>

Authorization will be Bearer when using generated access token. You have used Basic which is wrong


 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