The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

How to get username from oauth

Highlighted
Occasional Participant

How to get username from oauth

Hello,

I am integrating OAuth using PHP. But i want to to call few web services using the logged in username. So how i can get the username of the logged in user. Or do i have to ask for the username for accessing the API's from user.


Regards

Priyavrat

Priyavrat

3 REPLIES 3
Highlighted
Employee

username with oauth

Hello,



Our engineers are looking into this to see if this can be changed in the future, but currently the best way of getting the username would be to ask the user directly.  If there are any changes to this in the future we would post it on the developer site.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
Highlighted
New Member

username with oauth

Any update on this?  Most oAuth implementations we've worked with just return user details with the access tokens (for example, Twitter returns the screen_name and user_id as additional params).  Seems like an unnecessary step to then ask the user for their username, right?

Highlighted
Employee

Re: username with oauth

You are absolutely correct, and it is a little odd for the user to be asked this question twice. We are going to be updating our OAuth implementation in the very near future to return the username that was authorized so that you would not need to ask for this information twice. I do not have an exact date on this, but I can say it is coming very shortly.

David J

Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured