• Protocols
  • AEMP + OAuth2.0 (John Deere) - Can't refresh token?

I am trying to integrate to an AEMP provider (John Deere), that uses OAuth2.0 for auth.
When I configure my channel, I can get the Oauth authentication working OK, and I get access to the resources, but I have not been able to find a way to implement the token refresh needed to keep it working longer. The access token provided by john deere expires after 12hs, so it would be very inconvenient to have to manually refresh it and reconfigure it in flespi to keep everything going.

Is there any way to use AEMP + OAuth2.0 that takes care of the whole OAuth flow, including refreshing the tokens?

Thanks!!

Pepe

PepeCane
Hello,
According to the OAuth 2.0 specification, OAuth defines four grant types: authorization code, implicit, resource owner password credentials, and client credentials. For server-server communication, it is better to use the 'client credential' or 'resource owner password credentials' grant types (RFC 6749 4.3. Resource Owner Password Credentials Grant, 4.4. Client Credentials Grant)

If you have any questions about setting up, you can write to the account chat.

Write a Reply...