user3775824
user3775824

Reputation: 51

How to renew access token secret for Intuit QuickBooks integration with .net application?

I am using code in following link to Renew access token for Intuit QuickBooks integration.

https://gist.github.com/IntuitDeveloperRelations/7259345

but, I am unable to test this code as intuit renew its access token only after 150 days from token creation date and I've created token only few days back. So I don't know the output. Right now, it is generating xml response with error message.

Now this method is returning me a single string which seems to be the Access Token. Do I also need to renew Access Token Secret ? If yes, then how to generate it ? Or the output contains secret as well ?

Actually, Can you give me the output for this method?

Upvotes: 5

Views: 5925

Answers (3)

Jason
Jason

Reputation: 11

See if this reconnection code sample helps: http://developer.qbapi.com/Reconnect-to-Quickbooks-Online-.aspx

Upvotes: 0

nimisha shrivastava
nimisha shrivastava

Reputation: 2367

You can test Reconnect API in the following way- 1. Navigate to IPP Playground- Go to Manage My Apps->Click on your app

Fill in consumer key and consumer secret in links below.

Prod: https://appcenter.intuit.com/Playground/OAuth/IA/?ck=prodConsumerKey&cs=prodConsumerSecret

Alternatively, you can navigate to the Manage page for your app on stage or prod and click ‘Test connect to app (OAuth)’.

  1. Enter the duration you would like for the issued OAuth tokens (e.g., 3600 for successful Reconnect) in the ‘Access Token Duration’ field.

  2. Click on the Connect to QuickBooks button, go through OAuth flow to authorize a connection to a realm.

  3. Under the resulting Post-Connection Interactions heading, click ‘Reconnect API Test’. Screen shot attached.

  4. A new page will launch where your OAuth tokens are displayed. Copy these values to your application to test Reconnect.

Upvotes: 1

Keith Palmer Jr.
Keith Palmer Jr.

Reputation: 27962

A successful response looks like this:

<ReconnectResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://platform.intuit.com/api/v1">    
    <ErrorMessage/>    
    <ErrorCode>0</ErrorCode>    
    <ServerTime>2012-01-04T19:21:21.0782072Z</ServerTime>    
    <OAuthToken>qye2eIdQ5H5yMyrlJflUWh712xfFXjyNnW1MfbC0rz04TfCP</OAuthToken>    
    <OAuthTokenSecret>cyDeUNQTkFzoR0KkDn7viN6uLQxWTobeEUKW7I79</OAuthTokenSecret>
</ReconnectResponse>

Refer to Intuit's documentation.

Notice that you will get back both a new token and a new token secret which you should store.

Remember that you can use Intuit's OAuth Playground to generate shorter lived tokens to test with.

Upvotes: 3

Related Questions