Need Help Refreshing: Device Flow

LauraG70
Campaign Contributor
0 Votes

I setup an app api with:

OAuth Type: device flow

 

After 5 straight hours I finally figured out how to authorize getting the device flow:

(btw: why is the php sdk 8 years old?)   I'm basically creating my own.

https://v3.developer.constantcontact.com/api_guide/server_flow.html#step-1-create-an-authorization-r...

 

This is just for my internal app.  Why is this so difficult?

 

Now I'm stuck on Refreshing the Token.

 

The overview docs claim no client_secret is needed when using device-flow.

But at the bottom of the page where refresh token instruction are given: it states to combine client_id : client_secret and to base64() encode them.   what?

Soooo where is my client_secret?  The "create client secret" button is not present for device flow....BUT how do i create a refresh token without it?

 

(or if I am going about this wrong, please do inform)  this process is insane.

Please help.

 

Thanks

ps. I tried the Auth-Code-Flow method but cannot get past the empty white screen. (but has javascript)

 

 

 

2 REPLIES 2
Courtney_E
Employee
0 Votes

Hello LauraG70,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

Sorry for any confusion there, the Device flow does not utilize the client_secret and we have a ticket open to have that section of the documentation fixed.

 

While it won’t return any errors if excluded from your Authorization Request, you’ll want to include the new scope “offline_access” in your initial authorization request in order to return a refresh token.

 

Like so:

scope=contact_data+campaign_data+offline_access

 

Any existing SDKs created by Constant Contact would be for the legacy V2 version of our API, not for V3. 

 

The request for V3 application code samples is currently under review. However, we're currently still adding endpoints and capabilities to the V3 API, and do not plan to publish official sample apps until that process is complete. Your feedback and experience with this request is essential to improving our product, so thank you for reaching out to us regarding this matter.

 

In the meantime, here are the example calls that are currently available for V3:

 

V3 Code Samples:

https://v3.developer.constantcontact.com/api_guide/tag_code_samples.html

 

Additionally, you can utilize our API Reference tester to test out the functionality of our available endpoints to see how they will work once programmed within your application:

https://v3.developer.constantcontact.com/api_reference/index.html

 

For additional reference, here is the link to a sample that was created/shared on our Developer Forum by a 3rd party developer (NOT created or supported by Constant Contact) for V3 using PHP:

https://community.constantcontact.com/t5/Developer-Support-ask-questions/PHP-V3-Library-now-updated-...

 

You can also reach our team directly/securely via email at webservices@constantcontact.com if you have any follow up questions. We're happy to help.


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
emcins
Rookie
0 Votes
Resources
Developer Portal

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

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up