Yammer export api stopped working error 401

%3CLINGO-SUB%20id%3D%22lingo-sub-2492592%22%20slang%3D%22en-US%22%3EYammer%20export%20api%20stopped%20working%20error%20401%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2492592%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20PowerShell%20script%20running%20daily%20through%20task%20scheduler%20and%20I'm%20getting%20the%20following%20when%20running%20the%20export%20api%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EError%20message%3A%20The%20remote%20server%20returned%20an%20error%3A%20(401)%20Unauthorized.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%23%20You%20can%20use%20a%20relative%20date%20range%20for%20the%20export%20as%20well%2C%20by%20building%20out%20a%20date%20object%3CBR%20%2F%3E%24export%20%3D%20%22%3CA%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Fapi%2Fv1%2Fexport%3Fsince%3D%24dayBefore%26amp%3Binclude%3Dcsv%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fwww.yammer.com%2Fapi%2Fv1%2Fexport%3Fsince%3D%24dayBefore%26amp%3Binclude%3Dcsv%3C%2FA%3E%22%3C%2FP%3E%3CP%3E%3CSTRONG%3EERROR%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23FF0000%22%3Einvoke-webrequest%20%3A%20Requested%20export%20of%20model%20MessageVersion%20not%20allowed%20for%2012345679000%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23000000%22%3Ei%20have%203%20other%20yammer%20api's%20using%20the%20ame%20token%20and%20works%20just%20fine.%20it%20is%20just%20the%20above%20export%20api%20that%20stopped%20working%20recently.%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20even%20tried%20a%20new%20app%20registration%20w%2F%20new%20token%20just%20to%20see%20if%20that%20helped%20but%20no%20luck.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2492592%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EYammer%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

I have a PowerShell script running daily through task scheduler and I'm getting the following when running the export api:

 

Error message: The remote server returned an error: (401) Unauthorized.


# You can use a relative date range for the export as well, by building out a date object
$export = "https://www.yammer.com/api/v1/export?since=$dayBefore&include=csv"

ERROR

invoke-webrequest : Requested export of model MessageVersion not allowed for 12345679000

 

i have 3 other yammer api's using the ame token and works just fine. it is just the above export api that stopped working recently. 

 

i even tried a new app registration w/ new token just to see if that helped but no luck. 

0 Replies